1769 lines
59 KiB
C#
1769 lines
59 KiB
C#
#pragma warning disable 1591
|
|
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by a tool.
|
|
// Runtime Version:4.0.30319.34014
|
|
//
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
|
|
namespace Disco.Web.Areas.Config.Views.SystemConfig
|
|
{
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Text;
|
|
using System.Web;
|
|
using System.Web.Helpers;
|
|
using System.Web.Mvc;
|
|
using System.Web.Mvc.Ajax;
|
|
using System.Web.Mvc.Html;
|
|
using System.Web.Routing;
|
|
using System.Web.Security;
|
|
using System.Web.UI;
|
|
using System.Web.WebPages;
|
|
using Disco;
|
|
using Disco.BI.Extensions;
|
|
using Disco.Models.Repository;
|
|
using Disco.Services;
|
|
using Disco.Services.Authorization;
|
|
using Disco.Services.Web;
|
|
using Disco.Web;
|
|
using Disco.Web.Extensions;
|
|
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/SystemConfig/Index.cshtml")]
|
|
public partial class Index : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.SystemConfig.IndexModel>
|
|
{
|
|
public Index()
|
|
{
|
|
}
|
|
public override void Execute()
|
|
{
|
|
|
|
#line 2 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
Authorization.Require(Claims.Config.System.Show);
|
|
|
|
var canConfigProxy = Authorization.Has(Claims.Config.System.ConfigureProxy);
|
|
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");
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n<div");
|
|
|
|
WriteLiteral(" class=\"form\"");
|
|
|
|
WriteLiteral(" style=\"width: 450px\"");
|
|
|
|
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Disco Version:\r\n </th>\r\n <td>\r\n <div>\r\n " +
|
|
" <code>");
|
|
|
|
|
|
#line 24 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Model.DiscoVersion.ToString(4));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</code>\r\n </div>\r\n <div");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 953), Tuple.Create("\"", 1002)
|
|
|
|
#line 26 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 961), Tuple.Create<System.Object, System.Int32>(Model.DiscoVersionBuilt.ToFullDateTime()
|
|
|
|
#line default
|
|
#line hidden
|
|
, 961), false)
|
|
);
|
|
|
|
WriteLiteral(">\r\n Built ");
|
|
|
|
|
|
#line 27 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(CommonHelpers.FriendlyDate(Model.DiscoVersionBuilt, "Unknown"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
|
" <th");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Database Connection:\r\n </th>\r\n <td>\r\n <tabl" +
|
|
"e");
|
|
|
|
WriteLiteral(" class=\"sub\"");
|
|
|
|
WriteLiteral(">\r\n <tr>\r\n <th>Server:</th>\r\n " +
|
|
" <td><span");
|
|
|
|
WriteLiteral(" class=\"code\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 38 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Model.DatabaseServer);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span></td>\r\n </tr>\r\n <tr>\r\n " +
|
|
" <th>Database:</th>\r\n <td><span");
|
|
|
|
WriteLiteral(" class=\"code\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 42 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Model.DatabaseName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span></td>\r\n </tr>\r\n <tr>\r\n " +
|
|
" <th>Authentication:</th>\r\n <td>");
|
|
|
|
|
|
#line 46 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Model.DatabaseAuthentication);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</td>\r\n </tr>\r\n");
|
|
|
|
|
|
#line 48 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 48 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
if (Model.DatabaseSqlAuthUsername != null)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <tr>\r\n <th>SQL User:</th>" +
|
|
"\r\n <td><span");
|
|
|
|
WriteLiteral(" class=\"code\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 52 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Model.DatabaseSqlAuthUsername);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span></td>\r\n </tr> \r\n");
|
|
|
|
|
|
#line 54 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </table>\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
|
" <th");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Data Store Location:\r\n </th>\r\n <td>\r\n <span" +
|
|
"");
|
|
|
|
WriteLiteral(" class=\"code\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 63 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Model.DataStoreLocation);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>\r\n<div");
|
|
|
|
WriteLiteral(" class=\"form\"");
|
|
|
|
WriteLiteral(" style=\"width: 450px; margin-top: 15px;\"");
|
|
|
|
WriteLiteral(">\r\n <h2>Updates</h2>\r\n <table>\r\n");
|
|
|
|
|
|
#line 71 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 71 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
if (Model.UpdateLatestResponse == null)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <tr>\r\n <th");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Last Check:\r\n </th>\r\n <td>\r\n <d" +
|
|
"iv");
|
|
|
|
WriteLiteral(" class=\"error\"");
|
|
|
|
WriteLiteral("><i");
|
|
|
|
WriteLiteral(" class=\"fa fa-exclamation-circle fa-lg\"");
|
|
|
|
WriteLiteral("></i> Never</div>\r\n </td>\r\n </tr>\r\n");
|
|
|
|
|
|
#line 81 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <tr>\r\n <th");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Last Run:\r\n </th>\r\n <td>\r\n <spa" +
|
|
"n>");
|
|
|
|
|
|
#line 88 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(CommonHelpers.FriendlyDate(Model.UpdateLatestResponse.ResponseTimestamp));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span>\r\n </td>\r\n </tr>\r\n");
|
|
|
|
|
|
#line 91 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
if (Model.UpdateLatestResponse.IsUpdatable(typeof(DiscoApplication).Assembly.GetName().Version))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <tr>\r\n <th");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Update Available:\r\n </th>\r\n <td>\r\n " +
|
|
" <div>\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-info-circle fa-lg information\"");
|
|
|
|
WriteLiteral("></i> Version ");
|
|
|
|
|
|
#line 98 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Model.UpdateLatestResponse.Version);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" is available\r\n </div>\r\n <div");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">\r\n [Released ");
|
|
|
|
|
|
#line 101 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(CommonHelpers.FriendlyDate(Model.UpdateLatestResponse.VersionReleasedTimestamp));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("]\r\n </div>\r\n <div");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 103 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(new HtmlString(Model.UpdateLatestResponse.Blurb));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n <a");
|
|
|
|
WriteAttribute("href", Tuple.Create(" href=\"", 3996), Tuple.Create("\"", 4040)
|
|
|
|
#line 104 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 4003), Tuple.Create<System.Object, System.Int32>(Model.UpdateLatestResponse.UrlLink
|
|
|
|
#line default
|
|
#line hidden
|
|
, 4003), false)
|
|
);
|
|
|
|
WriteLiteral(" target=\"_blank\"");
|
|
|
|
WriteLiteral(">Download Now</a>\r\n </td>\r\n </tr>\r\n");
|
|
|
|
|
|
#line 107 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <tr>\r\n <th");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Status:\r\n </th>\r\n <td>\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-check-square fa-lg success\"");
|
|
|
|
WriteLiteral("></i> <span>The latest version is installed</span>\r\n </td>\r\n " +
|
|
" </tr>\r\n");
|
|
|
|
|
|
#line 117 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Check for Update:</th>\r\n <td>\r\n");
|
|
|
|
|
|
#line 123 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 123 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
if (Model.UpdateRunningStatus == null)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span>");
|
|
|
|
|
|
#line 126 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.ActionLinkSmallButton("Check Now", MVC.API.System.UpdateCheck()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span>\r\n");
|
|
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">[Will run automatically <strong>");
|
|
|
|
|
|
#line 127 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(CommonHelpers.FriendlyDate(Model.UpdateNextScheduled, "Unknown"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</strong>]</span>\r\n");
|
|
|
|
|
|
#line 128 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span>");
|
|
|
|
|
|
#line 131 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.ActionLink("View Status", MVC.Config.Logging.TaskStatus(Model.UpdateRunningStatus.SessionId)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span>\r\n");
|
|
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">[Running Now]</span>\r\n");
|
|
|
|
|
|
#line 133 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 135 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 135 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
if (Model.UpdateBetaDeployment)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <hr />\r\n");
|
|
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"alert\"");
|
|
|
|
WriteLiteral("><i");
|
|
|
|
WriteLiteral(" class=\"fa fa-info-circle fa-lg\"");
|
|
|
|
WriteLiteral("></i> Beta Deployment</span>\r\n");
|
|
|
|
|
|
#line 139 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n </table>\r\n</div>\r\n<div");
|
|
|
|
WriteLiteral(" class=\"form\"");
|
|
|
|
WriteLiteral(" style=\"width: 450px; margin-top: 15px;\"");
|
|
|
|
WriteLiteral(">\r\n <h2>Active Directory</h2>\r\n <table>\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Primary Domain:\r\n </th>\r\n <td>\r\n <code><str" +
|
|
"ong>");
|
|
|
|
|
|
#line 151 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Model.ADPrimaryDomain.Name);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</strong> <span>[");
|
|
|
|
|
|
#line 151 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Model.ADPrimaryDomain.NetBiosName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("]</span></code>\r\n </td>\r\n </tr>\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Additional Domains:\r\n </th>\r\n <td>\r\n");
|
|
|
|
|
|
#line 158 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 158 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
if (Model.ADDomains.Count > 1)
|
|
{
|
|
var adAdditionalDomains = Model.ADDomains.Where(d => d != Model.ADPrimaryDomain).OrderBy(d => d.Name).ToList();
|
|
var adDomainFirst = adAdditionalDomains.First();
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <code>");
|
|
|
|
|
|
#line 162 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(adDomainFirst.Name);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span>[");
|
|
|
|
|
|
#line 162 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(adDomainFirst.NetBiosName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("]</span></code>\r\n");
|
|
|
|
|
|
#line 163 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
foreach (var adDomain in adAdditionalDomains.Skip(1))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <hr />\r\n");
|
|
|
|
WriteLiteral(" <div>\r\n <code>");
|
|
|
|
|
|
#line 167 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(adDomain.Name);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span>[");
|
|
|
|
|
|
#line 167 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(adDomain.NetBiosName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("]</span></code>\r\n </div>\r\n");
|
|
|
|
|
|
#line 169 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None></span>\r\n");
|
|
|
|
|
|
#line 174 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Site:\r\n </th>\r\n <td>\r\n <code><strong>");
|
|
|
|
|
|
#line 181 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Model.ADSite.Name);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</strong></code>\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
|
"");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Servers:\r\n </th>\r\n <td>\r\n <div>\r\n");
|
|
|
|
|
|
#line 189 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 189 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
if (Model.ADServers.Count > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <ul");
|
|
|
|
WriteLiteral(" class=\"none\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 192 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 192 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
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;
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li>\r\n");
|
|
|
|
|
|
#line 197 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 197 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
if (server.IsAvailable)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-check success fa-fw fa-lg\"");
|
|
|
|
WriteLiteral(" title=\"Available\"");
|
|
|
|
WriteLiteral("></i>\r\n");
|
|
|
|
|
|
#line 200 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-exclamation warning fa-fw fa-lg\"");
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 8221), Tuple.Create("\"", 8304)
|
|
, Tuple.Create(Tuple.Create("", 8229), Tuple.Create("Unavailable,", 8229), true)
|
|
, Tuple.Create(Tuple.Create(" ", 8241), Tuple.Create("will", 8242), true)
|
|
, Tuple.Create(Tuple.Create(" ", 8246), Tuple.Create("retry", 8247), true)
|
|
, Tuple.Create(Tuple.Create(" ", 8252), Tuple.Create("at", 8253), true)
|
|
|
|
#line 203 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
, Tuple.Create(Tuple.Create(" ", 8255), Tuple.Create<System.Object, System.Int32>(server.AvailableWhen.Value.ToLongTimeString()
|
|
|
|
#line default
|
|
#line hidden
|
|
, 8256), false)
|
|
);
|
|
|
|
WriteLiteral("></i>\r\n");
|
|
|
|
|
|
#line 204 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <code>");
|
|
|
|
|
|
#line 205 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(serverDescription);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</code>\r\n");
|
|
|
|
|
|
#line 206 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 206 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
if (server.IsSiteServer)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-building-o information fa-fw\"");
|
|
|
|
WriteLiteral(" title=\"Site Server\"");
|
|
|
|
WriteLiteral("></i>\r\n");
|
|
|
|
|
|
#line 209 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-globe warning fa-fw\"");
|
|
|
|
WriteLiteral(" title=\"Not a Site Server\"");
|
|
|
|
WriteLiteral("></i>\r\n");
|
|
|
|
|
|
#line 213 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 214 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
if (server.IsWritable)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-pencil information fa-fw\"");
|
|
|
|
WriteLiteral(" title=\"Writable Domain Controller\"");
|
|
|
|
WriteLiteral("></i>\r\n");
|
|
|
|
|
|
#line 217 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </li>\r\n");
|
|
|
|
|
|
#line 219 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </ul>\r\n");
|
|
|
|
|
|
#line 221 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"error\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-exclamation-circle fa-lg\"");
|
|
|
|
WriteLiteral("></i> <span>None Found</span>\r\n </div>\r\n");
|
|
|
|
|
|
#line 227 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
|
" <th");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Forest:\r\n </th>\r\n <td>\r\n");
|
|
|
|
|
|
#line 235 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 235 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
if (Model.ADForestServers == null)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 238 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.CheckBoxFor(m => m.ADSearchAllForestServers, new { disabled = "disabled" }));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 238 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.LabelFor(m => m.ADSearchAllForestServers));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"info-box\"");
|
|
|
|
WriteLiteral(">\r\n <p");
|
|
|
|
WriteLiteral(" class=\"fa-p\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-info-circle\"");
|
|
|
|
WriteLiteral("></i>Forest servers are currently being retrieved.<br />\r\n " +
|
|
" Try refreshing this page in a moment.\r\n </p>\r\n " +
|
|
" </div>\r\n");
|
|
|
|
|
|
#line 246 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (canConfigAD)
|
|
{
|
|
var canSearchEntireForest = (Model.ADForestServers.Count <= Disco.Services.Interop.ActiveDirectory.ActiveDirectory.MaxForestServerSearch);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div>\r\n");
|
|
|
|
|
|
#line 253 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 253 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
if (!canSearchEntireForest)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 255 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.CheckBoxFor(m => m.ADSearchAllForestServers, new { disabled = "disabled" }));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 255 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 255 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.LabelFor(m => m.ADSearchAllForestServers));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 255 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"info-box\"");
|
|
|
|
WriteLiteral(">\r\n <p");
|
|
|
|
WriteLiteral(" class=\"fa-p\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-exclamation-circle warning\"");
|
|
|
|
WriteLiteral("></i>Disco will not search entire forests which consist of more than ");
|
|
|
|
|
|
#line 258 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Disco.Services.Interop.ActiveDirectory.ActiveDirectory.MaxForestServerSearch);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" servers. Only servers within this site will be searched.\r\n " +
|
|
" </p>\r\n </div>\r\n");
|
|
|
|
|
|
#line 261 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 264 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.CheckBoxFor(m => m.ADSearchAllForestServers));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 264 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 264 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.LabelFor(m => m.ADSearchAllForestServers));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 264 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 264 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 264 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">\r\n If this setting is enabled, Disco will query a" +
|
|
"ll servers within the forest rather than only servers within this site.\r\n " +
|
|
" </div>\r\n");
|
|
|
|
WriteLiteral(" <script>\r\n $(function " +
|
|
"() {\r\n document.DiscoFunctions.PropertyChange" +
|
|
"Helper($(\'#ADSearchAllForestServers\'), null, \'");
|
|
|
|
|
|
#line 270 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Url.Action(MVC.API.System.UpdateActiveDirectorySearchAllForestServers()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\', \'SearchAllForestServers\');\r\n });\r\n " +
|
|
" </script>\r\n");
|
|
|
|
|
|
#line 273 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n");
|
|
|
|
|
|
#line 275 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 279 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.CheckBoxFor(m => m.ADSearchAllForestServers, new { disabled = "disabled" }));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 279 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.LabelFor(m => m.ADSearchAllForestServers));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <div");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">\r\n If this setting is enabled, Disco will search all " +
|
|
"servers within the forest rather than only servers within this site.\r\n " +
|
|
" </div>\r\n </div>\r\n");
|
|
|
|
|
|
#line 284 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div>\r\n <hr />\r\n " +
|
|
" <span>All Servers:</span>\r\n <ul");
|
|
|
|
WriteLiteral(" id=\"Config_System_AD_ForestServers\"");
|
|
|
|
WriteLiteral(" class=\"none\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 289 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 289 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
var domainIndex = Model.ADDomains.ToDictionary(d => d.Name, StringComparer.OrdinalIgnoreCase);
|
|
foreach (var server in Model.ADForestServers.OrderBy(s => s))
|
|
{
|
|
var isSiteServer = Model.ADServers.Any(s => s.IsSiteServer && s.Name.Equals(server, StringComparison.OrdinalIgnoreCase));
|
|
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);
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li><code>");
|
|
|
|
|
|
#line 303 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(serverDescription);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</code>");
|
|
|
|
|
|
#line 303 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
if (isSiteServer)
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-building-o information fa-fw\"");
|
|
|
|
WriteLiteral(" title=\"Site Server\"");
|
|
|
|
WriteLiteral("></i> ");
|
|
|
|
|
|
#line 304 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</li>\r\n");
|
|
|
|
|
|
#line 305 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"
|
|
</ul>
|
|
<script>
|
|
$(function () {
|
|
var toManyServers = 5;
|
|
var ul = $('#Config_System_AD_ForestServers');
|
|
var ulLi = ul.find('li');
|
|
if (ulLi.length > toManyServers) {
|
|
var liMore = $('<li>').append(
|
|
$('<a>').attr('href', '#')
|
|
.text('Show All Servers (' + (ulLi.length - toManyServers) + ' more)')
|
|
.click(function () {
|
|
$(this).closest('li').remove();
|
|
ul.find('li').show();
|
|
return false;
|
|
}))
|
|
.insertAfter(ulLi[(toManyServers - 1)]);
|
|
ulLi.each(function (i) {
|
|
if (i > (toManyServers - 1))
|
|
$(this).hide();
|
|
});
|
|
}
|
|
});
|
|
</script>
|
|
</div>
|
|
");
|
|
|
|
|
|
#line 331 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Search Scope:\r\n </th>\r\n <td>\r\n");
|
|
|
|
|
|
#line 338 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 338 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
if (Model.ADSearchContainers != null && Model.ADSearchContainers.Count > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div>Searching is restricted to the following Organisational&" +
|
|
"nbsp;Unit containers</div>\r\n");
|
|
|
|
WriteLiteral(" <ul");
|
|
|
|
WriteLiteral(" id=\"Config_System_AD_SearchScope_DistinguishedNames\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 342 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 342 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
foreach (var adContainer in Model.ADSearchContainers)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li");
|
|
|
|
WriteLiteral(" data-distinguishedname=\"");
|
|
|
|
|
|
#line 344 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(adContainer.Item1);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral("><code>");
|
|
|
|
|
|
#line 344 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(adContainer.Item3);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</code></li>\r\n");
|
|
|
|
|
|
#line 345 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </ul>\r\n");
|
|
|
|
|
|
#line 347 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div>No restrictions are in effect.</div>\r\n");
|
|
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">When searching, the entire domain will be queried. This is suitable for most sin" +
|
|
"gle-domain deployments.</div>\r\n");
|
|
|
|
|
|
#line 352 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 353 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
if (canConfigAD)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div>\r\n <hr />\r\n " +
|
|
" <a");
|
|
|
|
WriteLiteral(" id=\"Config_System_AD_SearchScope_Update\"");
|
|
|
|
WriteLiteral(" href=\"#\"");
|
|
|
|
WriteLiteral(" class=\"button small\"");
|
|
|
|
WriteLiteral(">Update</a>\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Config_System_AD_SearchScope_Dialog\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteLiteral(" title=\"Search Scope\"");
|
|
|
|
WriteLiteral(">\r\n <div");
|
|
|
|
WriteLiteral(" id=\"Config_System_AD_SearchScope_Dialog_Loading\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 361 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" Loading Organisational Units\r\n </div>\r\n " +
|
|
" <div");
|
|
|
|
WriteLiteral(" id=\"Config_System_AD_SearchScope_Tree\"");
|
|
|
|
WriteLiteral(" class=\"organisationalUnitTree\"");
|
|
|
|
WriteLiteral(">\r\n </div>\r\n");
|
|
|
|
|
|
#line 365 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 365 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
using (Html.BeginForm(MVC.API.System.UpdateActiveDirectorySearchScope(null, redirect: true)))
|
|
{
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n");
|
|
|
|
WriteLiteral(" <script>\r\n $(function () {\r\n " +
|
|
" var $dialog, $tree, tree, distinguishedNames;\r\n\r\n " +
|
|
" function expandNodeTree(node) {\r\n " +
|
|
"var parent = node.parent;\r\n if (parent) {\r\n " +
|
|
" expandNodeTree(parent);\r\n " +
|
|
" if (!parent.isExpanded())\r\n pa" +
|
|
"rent.setExpanded(true, { noAnimation: true, noEvents: false });\r\n " +
|
|
" }\r\n }\r\n f" +
|
|
"unction selectDistinguishedNames() {\r\n if (!disti" +
|
|
"nguishedNames) {\r\n distinguishedNames = $(\'#C" +
|
|
"onfig_System_AD_SearchScope_DistinguishedNames\')\r\n " +
|
|
" .find(\'li\')\r\n .map(function () " +
|
|
"{ return $(this).attr(\'data-distinguishedname\'); }).get();\r\n " +
|
|
" }\r\n\r\n if (tree) {\r\n " +
|
|
" tree.visit(function (node) {\r\n " +
|
|
" if ($.inArray(node.key, distinguishedNames) >= 0) {\r\n " +
|
|
" node.setSelected(true);\r\n " +
|
|
" expandNodeTree(node);\r\n } e" +
|
|
"lse if (node.isSelected()) {\r\n node.s" +
|
|
"etSelected(false);\r\n }\r\n " +
|
|
" });\r\n }\r\n " +
|
|
" }\r\n\r\n function update() {\r\n\r\n " +
|
|
" if (!$dialog) {\r\n $dialog = $(" +
|
|
"\'#Config_System_AD_SearchScope_Dialog\').dialog({\r\n " +
|
|
" autoOpen: false,\r\n buttons: nul" +
|
|
"l,\r\n draggable: false,\r\n " +
|
|
" modal: true,\r\n res" +
|
|
"izable: false,\r\n width: 500,\r\n " +
|
|
" height: 500\r\n })" +
|
|
";\r\n $loading = $(\'#Config_System_AD_SearchSco" +
|
|
"pe_Dialog_Loading\');\r\n $loading.find(\'i.ajaxL" +
|
|
"oading\').show();\r\n\r\n $tree = $(\'#Config_Syste" +
|
|
"m_AD_SearchScope_Tree\');\r\n $dialog.css(\'overf" +
|
|
"low\', \'visible\');\r\n $tree.css(\'height\', \'100%" +
|
|
"\');\r\n\r\n $.getJSON(\'");
|
|
|
|
|
|
#line 419 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Url.Action(MVC.API.System.DomainOrganisationalUnits()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\', null, function (data) {\r\n $loading.hide" +
|
|
"();\r\n\r\n tree = $tree.fancytree({\r\n " +
|
|
" source: data,\r\n " +
|
|
" checkbox: true,\r\n sel" +
|
|
"ectMode: 2,\r\n keyboard: false,\r\n " +
|
|
" fx: null\r\n " +
|
|
" }).fancytree(\'getTree\');\r\n\r\n tre" +
|
|
"e.$container.css(\'position\', \'relative\');\r\n\r\n " +
|
|
" // Set Buttons\r\n $dialog.dialog(\'opt" +
|
|
"ion\', \'buttons\', {\r\n \'Search Entire F" +
|
|
"orest\': function () {\r\n var $this" +
|
|
" = $(this);\r\n $this.css(\'overflow" +
|
|
"\', \'hidden\');\r\n $this.dialog(\"dis" +
|
|
"able\");\r\n $this.dialog(\"option\", " +
|
|
"\"buttons\", null);\r\n\r\n var $form =" +
|
|
" $dialog.find(\'form\');\r\n $form.su" +
|
|
"bmit();\r\n },\r\n " +
|
|
" \'Save\': function () {\r\n " +
|
|
" var $this = $(this);\r\n " +
|
|
" $this.css(\'overflow\', \'hidden\');\r\n " +
|
|
" $this.dialog(\"disable\");\r\n $t" +
|
|
"his.dialog(\"option\", \"buttons\", null);\r\n\r\n " +
|
|
" var nodes = tree.getSelectedNodes();\r\n " +
|
|
" var $form = $dialog.find(\'form\');\r\n " +
|
|
" $.each(nodes, function (i, node) {\r\n " +
|
|
" $(\'<input>\').attr({ \'type\': \'hidden\', \'name\': \'Contai" +
|
|
"ners\', \'value\': node.key }).appendTo($form);\r\n " +
|
|
" });\r\n $form.submit(" +
|
|
");\r\n }\r\n " +
|
|
" });\r\n\r\n // Select & Expand\r\n " +
|
|
" selectDistinguishedNames();\r\n\r\n " +
|
|
" tree.options.fx = { height: \"toggle\", duration: 200" +
|
|
" };\r\n });\r\n\r\n " +
|
|
"}\r\n\r\n selectDistinguishedNames();\r\n\r\n " +
|
|
" $dialog.dialog(\'open\');\r\n\r\n r" +
|
|
"eturn false;\r\n }\r\n\r\n $(\'#C" +
|
|
"onfig_System_AD_SearchScope_Update\').click(update);\r\n });" +
|
|
"\r\n </script>\r\n");
|
|
|
|
|
|
#line 476 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n </table>\r\n</div>\r\n");
|
|
|
|
|
|
#line 481 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
if (canConfigProxy)
|
|
{
|
|
using (Html.BeginForm(MVC.API.System.UpdateProxySettings()))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"form\"");
|
|
|
|
WriteLiteral(" style=\"width: 450px; margin-top: 15px;\"");
|
|
|
|
WriteLiteral(">\r\n <h2>Proxy Settings</h2>\r\n <table>\r\n <tr>\r\n " +
|
|
" <th");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Address:\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 492 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.EditorFor(m => m.ProxyAddress));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<br />\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 493 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.ValidationMessageFor(m => m.ProxyAddress));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
|
"");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Port:\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 500 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.EditorFor(m => m.ProxyPort));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<br />\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 501 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.ValidationMessageFor(m => m.ProxyPort));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
|
"");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Username:\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 508 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.EditorFor(m => m.ProxyUsername));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<br />\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 509 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.ValidationMessageFor(m => m.ProxyUsername));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
|
"");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Password:\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 516 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.EditorFor(m => m.ProxyPassword));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<br />\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 517 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.ValidationMessageFor(m => m.ProxyPassword));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
|
"");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral("> \r\n </th>\r\n <td>\r\n <button" +
|
|
"");
|
|
|
|
WriteLiteral(" id=\"Config_System_Proxy_Save\"");
|
|
|
|
WriteLiteral(" type=\"button\"");
|
|
|
|
WriteLiteral(" class=\"button small\"");
|
|
|
|
WriteLiteral(">Save Proxy Settings</button>");
|
|
|
|
|
|
#line 524 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <script>\r\n $(function () {\r\n " +
|
|
" var button = $(\'#Config_System_Proxy_Save\');\r\n\r\n " +
|
|
" button.click(function () {\r\n var " +
|
|
"url = \'");
|
|
|
|
|
|
#line 530 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Url.Action(MVC.API.System.UpdateProxySettings()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"';
|
|
var data = {
|
|
ProxyAddress: $('#ProxyAddress').val(),
|
|
ProxyPort: $('#ProxyPort').val(),
|
|
ProxyUsername: $('#ProxyUsername').val(),
|
|
ProxyPassword: $('#ProxyPassword').val()
|
|
}
|
|
var ajaxLoading = button.next('.ajaxLoading').first().show();
|
|
|
|
$.getJSON(url, data, function (response, result) {
|
|
if (result != 'success' || response != 'OK') {
|
|
alert('Unable to change property ""' + UpdatePropertyName + '"":\n' + response);
|
|
ajaxLoading.hide();
|
|
} else {
|
|
ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
}
|
|
})
|
|
|
|
});
|
|
});
|
|
</script>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
");
|
|
|
|
|
|
#line 555 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"form\"");
|
|
|
|
WriteLiteral(" style=\"width: 450px; margin-top: 15px;\"");
|
|
|
|
WriteLiteral(">\r\n <h2>Proxy Settings</h2>\r\n <table>\r\n <tr>\r\n " +
|
|
" <th");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Address:\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 566 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.DisplayFor(m => m.ProxyAddress));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
|
"");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Port:\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 573 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.DisplayFor(m => m.ProxyPort));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
|
"");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Username:\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 580 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.DisplayFor(m => m.ProxyUsername));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
|
"");
|
|
|
|
WriteLiteral(" style=\"width: 135px\"");
|
|
|
|
WriteLiteral(">Password:\r\n </th>\r\n <td>********\r\n " +
|
|
"</td>\r\n </tr>\r\n </table>\r\n </div>\r\n");
|
|
|
|
|
|
#line 591 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<div");
|
|
|
|
WriteLiteral(" class=\"actionBar\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 593 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
|
Write(Html.ActionLinkButton("Update Device Last Network Logons", MVC.API.System.UpdateLastNetworkLogonDates()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n</div>\r\n");
|
|
|
|
}
|
|
}
|
|
}
|
|
#pragma warning restore 1591
|