qol: remove this
This commit is contained in:
@@ -18,7 +18,7 @@ namespace Disco.Web.Areas.Config.Models.AuthorizationRole
|
||||
{
|
||||
get
|
||||
{
|
||||
var rootNode = FancyTreeNode.FromClaimNavigatorItem(this.ClaimNavigator, false);
|
||||
var rootNode = FancyTreeNode.FromClaimNavigatorItem(ClaimNavigator, false);
|
||||
rootNode.expanded = true;
|
||||
|
||||
return new FancyTreeNode[] {
|
||||
|
||||
@@ -22,15 +22,15 @@ namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.DeviceProfile.OrganisationalUnit))
|
||||
if (string.IsNullOrEmpty(DeviceProfile.OrganisationalUnit))
|
||||
{
|
||||
var domain = ActiveDirectory.Context.PrimaryDomain;
|
||||
return domain.FriendlyDistinguishedNamePath(domain.DefaultComputerContainer);
|
||||
}
|
||||
else
|
||||
{
|
||||
var domain = ActiveDirectory.Context.GetDomainFromDistinguishedName(this.DeviceProfile.OrganisationalUnit);
|
||||
return domain.FriendlyDistinguishedNamePath(this.DeviceProfile.OrganisationalUnit);
|
||||
var domain = ActiveDirectory.Context.GetDomainFromDistinguishedName(DeviceProfile.OrganisationalUnit);
|
||||
return domain.FriendlyDistinguishedNamePath(DeviceProfile.OrganisationalUnit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,9 +49,9 @@ namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
||||
|
||||
public void UpdateModel(DiscoDataContext Database)
|
||||
{
|
||||
if (this.JobTypes == null)
|
||||
if (JobTypes == null)
|
||||
JobTypes = Database.JobTypes.ToList();
|
||||
if (this.JobSubTypes == null)
|
||||
if (JobSubTypes == null)
|
||||
JobSubTypes = Database.JobSubTypes.ToList();
|
||||
}
|
||||
|
||||
|
||||
@@ -43,20 +43,20 @@ namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
||||
public void UpdateModel(DiscoDataContext Database)
|
||||
{
|
||||
|
||||
switch (this.DocumentTemplate.Scope)
|
||||
switch (DocumentTemplate.Scope)
|
||||
{
|
||||
case Disco.Models.Repository.DocumentTemplate.DocumentTemplateScopes.Device:
|
||||
this.StoredInstanceCount = Database.DeviceAttachments.Count(a => a.DocumentTemplateId == this.DocumentTemplate.Id);
|
||||
StoredInstanceCount = Database.DeviceAttachments.Count(a => a.DocumentTemplateId == DocumentTemplate.Id);
|
||||
break;
|
||||
case Disco.Models.Repository.DocumentTemplate.DocumentTemplateScopes.Job:
|
||||
this.StoredInstanceCount = Database.JobAttachments.Count(a => a.DocumentTemplateId == this.DocumentTemplate.Id);
|
||||
StoredInstanceCount = Database.JobAttachments.Count(a => a.DocumentTemplateId == DocumentTemplate.Id);
|
||||
break;
|
||||
case Disco.Models.Repository.DocumentTemplate.DocumentTemplateScopes.User:
|
||||
this.StoredInstanceCount = Database.UserAttachments.Count(a => a.DocumentTemplateId == this.DocumentTemplate.Id);
|
||||
StoredInstanceCount = Database.UserAttachments.Count(a => a.DocumentTemplateId == DocumentTemplate.Id);
|
||||
break;
|
||||
}
|
||||
|
||||
if (this.JobTypes == null)
|
||||
if (JobTypes == null)
|
||||
JobTypes = Database.JobTypes.Include("JobSubTypes").ToList();
|
||||
|
||||
UserFlags = Database.UserFlags.ToList();
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
||||
list.Add(new SelectListItem() { Selected = false, Value = "--DEVICE", Text = "<Generic Device Document>" });
|
||||
list.Add(new SelectListItem() { Selected = true, Value = "--JOB", Text = "<Generic Job Document>" });
|
||||
list.Add(new SelectListItem() { Selected = false, Value = "--USER", Text = "<Generic User Document>" });
|
||||
list.AddRange(this.DocumentTemplates.ToSelectListItems());
|
||||
list.AddRange(DocumentTemplates.ToSelectListItems());
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace Disco.Web.Areas.Config.Models.JobPreferences
|
||||
new KeyValuePair<int, string>(56, "8 Weeks")
|
||||
};
|
||||
|
||||
var current = this.LongRunningJobDaysThreshold;
|
||||
var current = LongRunningJobDaysThreshold;
|
||||
if (!options.Any(o => o.Key == current))
|
||||
{
|
||||
options.Add(new KeyValuePair<int, string>(current, string.Format("{0} Days", current)));
|
||||
@@ -103,7 +103,7 @@ namespace Disco.Web.Areas.Config.Models.JobPreferences
|
||||
new KeyValuePair<int, string>(60 * 24 * 7 * 8, "8 weeks")
|
||||
};
|
||||
|
||||
var current = this.StaleJobMinutesThreshold;
|
||||
var current = StaleJobMinutesThreshold;
|
||||
if (!options.Any(o => o.Key == current))
|
||||
{
|
||||
options.Add(new KeyValuePair<int, string>(current, string.Format("{0} Minutes", current)));
|
||||
|
||||
@@ -11,10 +11,10 @@ namespace Disco.Web.Areas.Config.Models.Plugins
|
||||
|
||||
public PluginConfigurationViewModel(PluginConfigurationHandler.PluginConfigurationHandlerGetResponse response)
|
||||
{
|
||||
this.Manifest = response.Manifest;
|
||||
Manifest = response.Manifest;
|
||||
|
||||
this.PluginViewType = response.ViewType;
|
||||
this.PluginViewModel = response.Model;
|
||||
PluginViewType = response.ViewType;
|
||||
PluginViewModel = response.Model;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -49,28 +49,28 @@ namespace Disco.Web.Areas.Config.Models.SystemConfig
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.DatabaseConnectionString.Value.DataSource;
|
||||
return DatabaseConnectionString.Value.DataSource;
|
||||
}
|
||||
}
|
||||
public string DatabaseName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.DatabaseConnectionString.Value.InitialCatalog;
|
||||
return DatabaseConnectionString.Value.InitialCatalog;
|
||||
}
|
||||
}
|
||||
public string DatabaseAuthentication
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.DatabaseConnectionString.Value.IntegratedSecurity ? "Integrated Authentication" : "SQL Authentication";
|
||||
return DatabaseConnectionString.Value.IntegratedSecurity ? "Integrated Authentication" : "SQL Authentication";
|
||||
}
|
||||
}
|
||||
public string DatabaseSqlAuthUsername
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.DatabaseConnectionString.Value.IntegratedSecurity ? null : this.DatabaseConnectionString.Value.UserID;
|
||||
return DatabaseConnectionString.Value.IntegratedSecurity ? null : DatabaseConnectionString.Value.UserID;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user