@model Disco.Web.Areas.Config.Models.SystemConfig.IndexModel @{ Authorization.Require(Claims.Config.System.Show); var canConfigProxy = Authorization.Has(Claims.Config.System.ConfigureProxy); var canConfigEmail = Authorization.Has(Claims.Config.System.ConfigureEmail); var canConfigAD = Authorization.Has(Claims.Config.System.ConfigureActiveDirectory); ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "System"); if (canConfigAD) { Html.BundleDeferred("~/Style/Fancytree"); Html.BundleDeferred("~/ClientScripts/Modules/jQuery-Fancytree"); Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers"); } }
Disco Version:
@Model.DiscoVersion.ToString(4)
Built @CommonHelpers.FriendlyDate(Model.DiscoVersionBuilt, "Unknown")
Database Connection: @{if (Model.DatabaseSqlAuthUsername != null) { } }
Server: @Model.DatabaseServer
Database: @Model.DatabaseName
Authentication: @Model.DatabaseAuthentication
SQL User: @Model.DatabaseSqlAuthUsername
Data Store Location: @Model.DataStoreLocation

Updates

@{ if (Model.UpdateLatestResponse == null) { } else { if (Model.UpdateAvailable) { } else { } } }
Last Check:
 Never
Last Run: @CommonHelpers.FriendlyDate(Model.UpdateLatestResponse.UpdateResponseDate.ToLocalTime())
Update Available:
 Version @(Model.UpdateLatestResponse.LatestVersion) is available
[Released @(CommonHelpers.FriendlyDate(Model.UpdateLatestResponse.ReleasedDate))]
@(new HtmlString(Model.UpdateLatestResponse.Description))
Download Now
Status:  The latest version is installed
Check for Update: @{ if (Model.UpdateRunningStatus == null) { @Html.ActionLinkSmallButton("Check Now", MVC.API.System.UpdateCheck()) [Will run automatically @CommonHelpers.FriendlyDate(Model.UpdateNextScheduled, "Unknown")] } else { @Html.ActionLink("View Status", MVC.Config.Logging.TaskStatus(Model.UpdateRunningStatus.SessionId)) [Running Now] } } @if (Model.UpdateBetaDeployment) {
 Beta Deployment }

Active Directory

Primary Domain: @Model.ADPrimaryDomain.Name [@Model.ADPrimaryDomain.NetBiosName]
Additional Domains: @if (Model.ADDomains.Count > 1) { var adAdditionalDomains = Model.ADDomains.Where(d => d != Model.ADPrimaryDomain).OrderBy(d => d.Name).ToList(); var adDomainFirst = adAdditionalDomains.First(); @adDomainFirst.Name [@adDomainFirst.NetBiosName] foreach (var adDomain in adAdditionalDomains.Skip(1)) {
@adDomain.Name [@adDomain.NetBiosName]
} } else { <None> }
Site: @Model.ADSite.Name
Servers:
@if (Model.ADServers.Count > 0) {
    @foreach (var server in Model.ADServers) { var serverDescription = string.Format("{0} [{1}]", server.Name.EndsWith(server.Domain.Name, StringComparison.OrdinalIgnoreCase) ? server.Name.Substring(0, server.Name.Length - server.Domain.Name.Length - 1) : server.Name, server.Domain.NetBiosName); var reachable = server.IsAvailable;
  • @if (server.IsAvailable) { } else { } @(serverDescription) @if (server.IsSiteServer) { } else { } @if (server.IsWritable) { }
  • }
} else {
 None Found
}
Directory: @if (Model.ADAllServers == null) {
@Html.CheckBoxFor(m => m.ADSearchAllServers, new { disabled = "disabled" }) @Html.LabelFor(m => m.ADSearchAllServers)

Directory servers are currently being retrieved.
Try refreshing this page in a moment.

} else { if (canConfigAD) { var canSearchEntireDirectory = (Model.ADAllServers.Count <= Disco.Services.Interop.ActiveDirectory.ActiveDirectory.MaxAllServerSearch);
@if (!canSearchEntireDirectory) { @Html.CheckBoxFor(m => m.ADSearchAllServers, new { disabled = "disabled" }) @Html.LabelFor(m => m.ADSearchAllServers)

Disco will not search the entire directory which consists of more than @(Disco.Services.Interop.ActiveDirectory.ActiveDirectory.MaxAllServerSearch) servers. Only servers within this site will be searched.

} else { @Html.CheckBoxFor(m => m.ADSearchAllServers) @Html.LabelFor(m => m.ADSearchAllServers) @AjaxHelpers.AjaxLoader()

If this setting is enabled, Disco will query all servers within the directory rather than only servers within this site.

}
} else {
@Html.CheckBoxFor(m => m.ADSearchAllServers, new { disabled = "disabled" }) @Html.LabelFor(m => m.ADSearchAllServers)

If this setting is enabled, Disco will query all servers within the directory rather than only servers within this site.

}

All Servers:
    @{ var domainIndex = Model.ADDomains.ToDictionary(d => d.Name, StringComparer.OrdinalIgnoreCase); var siteServers = Model.ADServers.Where(s => s.IsSiteServer).ToDictionary(s => s.Name, StringComparer.OrdinalIgnoreCase); foreach (var server in Model.ADAllServers.OrderBy(s => s)) { var serverDescription = server; if (server.Contains('.')) { Disco.Services.Interop.ActiveDirectory.ADDomain serverDomain; if (domainIndex.TryGetValue(server.Substring(server.IndexOf('.') + 1), out serverDomain)) { serverDescription = string.Format("{0} [{1}]", server.Substring(0, server.IndexOf('.')), serverDomain.NetBiosName); } }
  • @serverDescription@if (siteServers.ContainsKey(server)) {}
  • } }
}
Searching: @{ object ADSearchWildcardSuffixOnlyAttributes = null; if (!canConfigAD) { ADSearchWildcardSuffixOnlyAttributes = new { disabled = "disabled" }; } } @Html.CheckBoxFor(m => m.ADSearchWildcardSuffixOnly, ADSearchWildcardSuffixOnlyAttributes) @Html.LabelFor(m => m.ADSearchWildcardSuffixOnly) @AjaxHelpers.AjaxLoader()

If this setting is enabled, Disco will utilize Active Directory indexes to greatly improve search performance. If disabled, more results may be returned however performance will be reduced especially in large Active Directory domains.

@if (canConfigAD) { }
Search Scope: @if (Model.ADSearchContainers != null && Model.ADSearchContainers.Count > 0) {
Searching is restricted to the following Organisational Unit containers
    @foreach (var adContainer in Model.ADSearchContainers) {
  • @adContainer.Item3
  • }
} else {
No Organisational Unit restrictions are in effect.

When searching, the entire domain will be queried. This is suitable for most single-domain deployments.

} @if (canConfigAD) {
@AjaxHelpers.AjaxLoader() Loading Organisational Units
@using (Html.BeginForm(MVC.API.System.UpdateActiveDirectorySearchScope(null, redirect: true))) { }
}
@if (canConfigProxy) { using (Html.BeginForm(MVC.API.System.UpdateProxySettings())) {

Proxy Settings

Address: @Html.EditorFor(m => m.ProxyAddress)
@Html.ValidationMessageFor(m => m.ProxyAddress)
Port: @Html.EditorFor(m => m.ProxyPort)
@Html.ValidationMessageFor(m => m.ProxyPort)
Username: @Html.EditorFor(m => m.ProxyUsername)
@Html.ValidationMessageFor(m => m.ProxyUsername)
Password: @Html.EditorFor(m => m.ProxyPassword)
@Html.ValidationMessageFor(m => m.ProxyPassword)
  @AjaxHelpers.AjaxLoader()
} } else {

Proxy Settings

Address: @Html.DisplayFor(m => m.ProxyAddress)
Port: @Html.DisplayFor(m => m.ProxyPort)
Username: @Html.DisplayFor(m => m.ProxyUsername)
Password: ********
} @if (canConfigEmail) {

Email Settings

SMTP Server: @Html.EditorFor(m => m.EmailSmtpServer)
@Html.ValidationMessageFor(m => m.EmailSmtpServer)
Port: @Html.EditorFor(m => m.EmailSmtpPort)
@Html.ValidationMessageFor(m => m.EmailSmtpPort)
Default From Address: @Html.EditorFor(m => m.EmailFromAddress)
@Html.ValidationMessageFor(m => m.EmailFromAddress)
  @Html.CheckBoxFor(m => m.EmailEnableSsl) @Html.LabelFor(m => m.EmailEnableSsl)
Username: @Html.EditorFor(m => m.EmailUsername)
@Html.ValidationMessageFor(m => m.EmailUsername)
Password: @Html.EditorFor(m => m.EmailPassword)
@Html.ValidationMessageFor(m => m.EmailPassword)
  @Html.AntiForgeryToken() @AjaxHelpers.AjaxLoader()

 Recipient Email Address:


@using (Html.BeginForm(MVC.API.System.SendTestEmail(), FormMethod.Post)) { @Html.AntiForgeryToken() }
} else {

Email Settings

SMTP Server: @Html.DisplayFor(m => m.EmailSmtpServer)
Port: @Html.DisplayFor(m => m.EmailSmtpPort)
Default From Address: @Html.DisplayFor(m => m.EmailFromAddress)
Enable SSL: @Html.CheckBoxFor(m => m.EmailEnableSsl, new { disabled = "disabled" }) @Html.LabelFor(m => m.EmailEnableSsl)
Username: @Html.DisplayFor(m => m.EmailUsername)
Password: ********
}
@Html.ActionLinkButton("Update Device Last Network Logons", MVC.API.System.UpdateLastNetworkLogonDates())