Status when loading AD Organisational Units
Large domains can take significant time (several seconds) to load the domain structure (where there are 1000's of OUs)
This commit is contained in:
@@ -275,7 +275,12 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
.Select(d => new Models.System.DomainOrganisationalUnitsModel() { Domain = d, OrganisationalUnits = ActiveDirectory.RetrieveOrganisationalUnitStructure(d) })
|
||||
.Select(ous => ous.ToFancyTreeNode()).ToList();
|
||||
|
||||
return Json(domainOUs, JsonRequestBehavior.AllowGet);
|
||||
return new JsonResult()
|
||||
{
|
||||
Data = domainOUs,
|
||||
JsonRequestBehavior = JsonRequestBehavior.AllowGet,
|
||||
MaxJsonLength = int.MaxValue
|
||||
};
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -538,6 +538,9 @@
|
||||
</div>
|
||||
<a id="changeOrganisationalUnit" href="#" class="button small">Change</a>@AjaxHelpers.AjaxLoader()
|
||||
<div id="dialogOrganisationalUnit" title="Organisational Unit" class="dialog">
|
||||
<div id="dialogOrganisationalUnit_Loading">
|
||||
@AjaxHelpers.AjaxLoader() Loading Organisational Units
|
||||
</div>
|
||||
<div id="treeOrganisationalUnit" class="organisationalUnitTree">
|
||||
</div>
|
||||
</div>
|
||||
@@ -586,11 +589,15 @@
|
||||
width: 500,
|
||||
height: 500
|
||||
});
|
||||
$loading = $('#dialogOrganisationalUnit_Loading');
|
||||
$loading.find('i.ajaxLoading').show();
|
||||
|
||||
$ouTree = $('#treeOrganisationalUnit');
|
||||
$dialog.css('overflow', 'visible');
|
||||
$ouTree.css('height', '100%');
|
||||
|
||||
$.getJSON('@(Url.Action(MVC.API.System.DomainOrganisationalUnits()))', null, function (data) {
|
||||
$loading.hide();
|
||||
|
||||
// Make 'Domains' unselectable
|
||||
$.each(data, function (i, node) {
|
||||
|
||||
@@ -1688,6 +1688,22 @@ WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"dialogOrganisationalUnit_Loading\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 542 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" Loading Organisational Units\r\n </div>\r\n " +
|
||||
" <div");
|
||||
|
||||
WriteLiteral(" id=\"treeOrganisationalUnit\"");
|
||||
|
||||
WriteLiteral(" class=\"organisationalUnitTree\"");
|
||||
@@ -1701,7 +1717,7 @@ WriteLiteral(" type=\"text/javascript\"");
|
||||
WriteLiteral(">\r\n $(function () {\r\n var ouSetUrl = \'");
|
||||
|
||||
|
||||
#line 546 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 549 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.DeviceProfile.UpdateOrganisationalUnit(Model.DeviceProfile.Id, null, true)));
|
||||
|
||||
|
||||
@@ -1736,59 +1752,61 @@ WriteLiteral("\';\r\n var ouValue = $(\'#DeviceProfile_Or
|
||||
" modal: true,\r\n resiz" +
|
||||
"able: false,\r\n width: 500,\r\n " +
|
||||
" height: 500\r\n });\r\n " +
|
||||
" $ouTree = $(\'#treeOrganisationalUnit\');\r\n " +
|
||||
" $dialog.css(\'overflow\', \'visible\');\r\n " +
|
||||
" $ouTree.css(\'height\', \'100%\');\r\n\r\n $.getJSON(\'" +
|
||||
"");
|
||||
" $loading = $(\'#dialogOrganisationalUnit_Loading\');\r\n " +
|
||||
" $loading.find(\'i.ajaxLoading\').show();\r\n\r\n " +
|
||||
" $ouTree = $(\'#treeOrganisationalUnit\');\r\n " +
|
||||
" $dialog.css(\'overflow\', \'visible\');\r\n " +
|
||||
" $ouTree.css(\'height\', \'100%\');\r\n\r\n $.getJSON(\'");
|
||||
|
||||
|
||||
#line 593 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 599 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.System.DomainOrganisationalUnits()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\', null, function (data) {\r\n\r\n // Make \'Domain" +
|
||||
"s\' unselectable\r\n $.each(data, function (i, n" +
|
||||
"ode) {\r\n node.unselectable = true;\r\n " +
|
||||
" });\r\n\r\n ouTree" +
|
||||
" = $ouTree.fancytree({\r\n source: data,\r\n " +
|
||||
" checkbox: false,\r\n " +
|
||||
" selectMode: 1,\r\n keyboar" +
|
||||
"d: false,\r\n fx: null\r\n " +
|
||||
" }).fancytree(\'getTree\');\r\n\r\n " +
|
||||
" ouTree.$container.css(\'position\', \'relative\');\r\n\r\n " +
|
||||
" // Set Buttons\r\n $dialog.dialog(\'optio" +
|
||||
"n\', \'buttons\', {\r\n \'Use Default Container" +
|
||||
"\': function () {\r\n var $this = $(this" +
|
||||
");\r\n $this.css(\'overflow\', \'hidden\');" +
|
||||
"\r\n $this.dialog(\"disable\");\r\n " +
|
||||
" $this.dialog(\"option\", \"buttons\", null);\r\n " +
|
||||
" ouSet(\'\');\r\n " +
|
||||
" },\r\n \'Save\': function () {\r" +
|
||||
"\n var node = ouTree.getActiveNode();\r" +
|
||||
"\n if (node && node.key.substr(0, 3).t" +
|
||||
"oLowerCase() == \'ou=\') {\r\n var $t" +
|
||||
"his = $(this);\r\n $this.css(\'overf" +
|
||||
"low\', \'hidden\');\r\n $this.dialog(\"" +
|
||||
"disable\");\r\n $this.dialog(\"option" +
|
||||
"\", \"buttons\", null);\r\n ouSet(node" +
|
||||
".key);\r\n } else {\r\n " +
|
||||
" alert(\'Select an Organisational Unit to Save\')\r\n " +
|
||||
" }\r\n " +
|
||||
" }\r\n });\r\n\r\n " +
|
||||
" // Expand\r\n expandAndFocusNode(ouValue" +
|
||||
");\r\n\r\n ouTree.options.fx = { height: \"toggle\"" +
|
||||
", duration: 200 };\r\n });\r\n " +
|
||||
" }\r\n $dialog.dialog(\'open\');\r\n\r\n " +
|
||||
" if (ouTree) {\r\n // Expand\r\n " +
|
||||
" expandAndFocusNode(ouValue);\r\n }" +
|
||||
"\r\n\r\n return false;\r\n };\r\n\r\n " +
|
||||
" $(\'#changeOrganisationalUnit\').click(ouChange);\r\n " +
|
||||
" });\r\n </script>\r\n");
|
||||
WriteLiteral("\', null, function (data) {\r\n $loading.hide();\r" +
|
||||
"\n\r\n // Make \'Domains\' unselectable\r\n " +
|
||||
" $.each(data, function (i, node) {\r\n " +
|
||||
" node.unselectable = true;\r\n " +
|
||||
" });\r\n\r\n ouTree = $ouTree.fancytree({\r\n " +
|
||||
" source: data,\r\n " +
|
||||
" checkbox: false,\r\n selectMod" +
|
||||
"e: 1,\r\n keyboard: false,\r\n " +
|
||||
" fx: null\r\n }).fancyt" +
|
||||
"ree(\'getTree\');\r\n\r\n ouTree.$container.css(\'po" +
|
||||
"sition\', \'relative\');\r\n\r\n // Set Buttons\r\n " +
|
||||
" $dialog.dialog(\'option\', \'buttons\', {\r\n " +
|
||||
" \'Use Default Container\': function () {\r\n " +
|
||||
" var $this = $(this);\r\n " +
|
||||
" $this.css(\'overflow\', \'hidden\');\r\n " +
|
||||
" $this.dialog(\"disable\");\r\n " +
|
||||
" $this.dialog(\"option\", \"buttons\", null);\r\n " +
|
||||
" ouSet(\'\');\r\n },\r\n " +
|
||||
" \'Save\': function () {\r\n " +
|
||||
" var node = ouTree.getActiveNode();\r\n " +
|
||||
" if (node && node.key.substr(0, 3).toLowerCase() == \'ou=\') {\r\n" +
|
||||
" var $this = $(this);\r\n " +
|
||||
" $this.css(\'overflow\', \'hidden\');\r\n " +
|
||||
" $this.dialog(\"disable\");\r\n " +
|
||||
" $this.dialog(\"option\", \"buttons\", null);\r\n " +
|
||||
" ouSet(node.key);\r\n " +
|
||||
" } else {\r\n " +
|
||||
" alert(\'Select an Organisational Unit to Save\')\r\n " +
|
||||
" }\r\n }\r\n " +
|
||||
" });\r\n\r\n // Expand\r\n " +
|
||||
" expandAndFocusNode(ouValue);\r\n\r\n " +
|
||||
" ouTree.options.fx = { height: \"toggle\", duration: 200 };\r\n " +
|
||||
" });\r\n }\r\n " +
|
||||
" $dialog.dialog(\'open\');\r\n\r\n if (ouTree) {\r\n" +
|
||||
" // Expand\r\n expan" +
|
||||
"dAndFocusNode(ouValue);\r\n }\r\n\r\n " +
|
||||
" return false;\r\n };\r\n\r\n $(\'#c" +
|
||||
"hangeOrganisationalUnit\').click(ouChange);\r\n });\r\n " +
|
||||
" </script>\r\n");
|
||||
|
||||
|
||||
#line 652 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 659 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1805,13 +1823,13 @@ WriteLiteral(" class=\"code\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 656 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 663 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 656 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 663 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
if (string.IsNullOrEmpty(Model.DeviceProfile.OrganisationalUnit))
|
||||
{
|
||||
|
||||
@@ -1821,7 +1839,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" <span>{Default Computers Container}</span>\r\n");
|
||||
|
||||
|
||||
#line 659 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 666 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1836,7 +1854,7 @@ WriteLiteral(" <span>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 665 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 672 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
Write(Disco.Services.Interop.ActiveDirectory.ActiveDirectoryExtensions.GetFriendlyOrganisationalUnitName(domain, Model.DeviceProfile.OrganisationalUnit));
|
||||
|
||||
|
||||
@@ -1845,7 +1863,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </span>\r\n");
|
||||
|
||||
|
||||
#line 667 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 674 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1854,7 +1872,7 @@ WriteLiteral("\r\n </span>\r\n");
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 669 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 676 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1867,13 +1885,13 @@ WriteLiteral(" style=\"margin-top: 8px;\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 671 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 678 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 671 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 678 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
if (canConfig)
|
||||
{
|
||||
|
||||
@@ -1889,7 +1907,7 @@ WriteLiteral(" type=\"checkbox\"");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 673 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 680 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
Write(Model.DeviceProfile.EnforceOrganisationalUnit ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty));
|
||||
|
||||
|
||||
@@ -1910,7 +1928,7 @@ WriteLiteral(@">
|
||||
$.getJSON('");
|
||||
|
||||
|
||||
#line 680 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 687 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.DeviceProfile.UpdateEnforceOrganisationalUnit(Model.DeviceProfile.Id)));
|
||||
|
||||
|
||||
@@ -1930,7 +1948,7 @@ WriteLiteral(@"', data, function (response, result) {
|
||||
");
|
||||
|
||||
|
||||
#line 691 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 698 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1947,7 +1965,7 @@ WriteLiteral(" type=\"checkbox\"");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 694 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 701 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
Write(Model.DeviceProfile.EnforceOrganisationalUnit ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty));
|
||||
|
||||
|
||||
@@ -1956,7 +1974,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" disabled=\"disabled\" />\r\n");
|
||||
|
||||
|
||||
#line 695 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 702 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1972,7 +1990,7 @@ WriteLiteral(">\r\n Enforce Organisational Unit\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 699 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 706 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
@@ -1982,7 +2000,7 @@ WriteLiteral("\r\n </div>\r\n </td>\r\n </tr>\r
|
||||
"\n");
|
||||
|
||||
|
||||
#line 705 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 712 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
if (canDelete)
|
||||
{
|
||||
|
||||
@@ -2037,7 +2055,7 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 741 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 748 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2050,13 +2068,13 @@ WriteLiteral(" class=\"actionBar\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 743 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 750 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 743 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 750 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
if (canDelete)
|
||||
{
|
||||
|
||||
@@ -2064,14 +2082,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 745 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 752 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
Write(Html.ActionLinkButton("Delete", MVC.API.DeviceProfile.Delete(Model.DeviceProfile.Id, true), "buttonDelete"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 745 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 752 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -2081,7 +2099,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 747 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 754 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Actions.Export))
|
||||
{
|
||||
|
||||
@@ -2089,14 +2107,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 749 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 756 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
Write(Html.ActionLinkButton("Export Devices", MVC.API.DeviceProfile.ExportDevices(Model.DeviceProfile.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 749 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 756 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -2106,7 +2124,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 751 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 758 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Search))
|
||||
{
|
||||
|
||||
@@ -2114,14 +2132,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 753 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 760 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
Write(Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceProfile.Id.ToString(), "DeviceProfile")));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 753 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
#line 760 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -314,6 +314,9 @@
|
||||
<a id="Config_System_AD_SearchScope_Update" href="#" class="button small">Update</a>
|
||||
</div>
|
||||
<div id="Config_System_AD_SearchScope_Dialog" class="dialog" title="Search Scope">
|
||||
<div id="Config_System_AD_SearchScope_Dialog_Loading">
|
||||
@AjaxHelpers.AjaxLoader() Loading Organisational Units
|
||||
</div>
|
||||
<div id="Config_System_AD_SearchScope_Tree" class="organisationalUnitTree">
|
||||
</div>
|
||||
@using (Html.BeginForm(MVC.API.System.UpdateActiveDirectorySearchScope(null, redirect: true)))
|
||||
@@ -363,12 +366,15 @@
|
||||
width: 500,
|
||||
height: 500
|
||||
});
|
||||
$loading = $('#Config_System_AD_SearchScope_Dialog_Loading');
|
||||
$loading.find('i.ajaxLoading').show();
|
||||
|
||||
$tree = $('#Config_System_AD_SearchScope_Tree');
|
||||
$dialog.css('overflow', 'visible');
|
||||
$tree.css('height', '100%');
|
||||
|
||||
$.getJSON('@(Url.Action(MVC.API.System.DomainOrganisationalUnits()))', null, function (data) {
|
||||
|
||||
$loading.hide();
|
||||
|
||||
tree = $tree.fancytree({
|
||||
source: data,
|
||||
|
||||
@@ -1204,6 +1204,22 @@ WriteLiteral(" title=\"Search Scope\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"Config_System_AD_SearchScope_Dialog_Loading\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 318 "..\..\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\"");
|
||||
@@ -1211,13 +1227,13 @@ WriteLiteral(" class=\"organisationalUnitTree\"");
|
||||
WriteLiteral(">\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 319 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
#line 322 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 319 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
#line 322 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
using (Html.BeginForm(MVC.API.System.UpdateActiveDirectorySearchScope(null, redirect: true)))
|
||||
{
|
||||
}
|
||||
@@ -1256,58 +1272,61 @@ WriteLiteral(" <script>\r\n $(function
|
||||
" modal: true,\r\n res" +
|
||||
"izable: false,\r\n width: 500,\r\n " +
|
||||
" height: 500\r\n })" +
|
||||
";\r\n $tree = $(\'#Config_System_AD_SearchScope_" +
|
||||
"Tree\');\r\n $dialog.css(\'overflow\', \'visible\');" +
|
||||
"\r\n $tree.css(\'height\', \'100%\');\r\n\r\n " +
|
||||
" $.getJSON(\'");
|
||||
";\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 370 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
#line 376 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
Write(Url.Action(MVC.API.System.DomainOrganisationalUnits()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\', null, function (data) {\r\n\r\n\r\n tree = $t" +
|
||||
"ree.fancytree({\r\n source: data,\r\n " +
|
||||
" checkbox: true,\r\n " +
|
||||
" selectMode: 2,\r\n " +
|
||||
" keyboard: false,\r\n fx: null\r\n " +
|
||||
" }).fancytree(\'getTree\');\r\n\r\n " +
|
||||
" tree.$container.css(\'position\', \'relative\');\r\n\r\n " +
|
||||
" // Set Buttons\r\n " +
|
||||
" $dialog.dialog(\'option\', \'buttons\', {\r\n " +
|
||||
" \'Search Entire Forest\': function () {\r\n " +
|
||||
" var $this = $(this);\r\n " +
|
||||
" $this.css(\'overflow\', \'hidden\');\r\n " +
|
||||
" $this.dialog(\"disable\");\r\n " +
|
||||
" $this.dialog(\"option\", \"buttons\", null);\r\n\r\n " +
|
||||
" var $form = $dialog.find(\'form\');\r\n " +
|
||||
" $form.submit();\r\n },\r" +
|
||||
"\n \'Save\': function () {\r\n " +
|
||||
" var $this = $(this);\r\n " +
|
||||
" $this.css(\'overflow\', \'hidden\');\r\n " +
|
||||
" $this.dialog(\"disable\");\r\n " +
|
||||
" $this.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\': \'Containers\', \'value\': node.key }).appendTo($form);\r\n " +
|
||||
" });\r\n " +
|
||||
" $form.submit();\r\n }\r\n " +
|
||||
" });\r\n\r\n " +
|
||||
" // Select & Expand\r\n selectDistinguishe" +
|
||||
"dNames();\r\n\r\n tree.options.fx = { height:" +
|
||||
" \"toggle\", duration: 200 };\r\n });\r\n\r\n " +
|
||||
" }\r\n\r\n selectDistinguished" +
|
||||
"Names();\r\n\r\n $dialog.dialog(\'open\');\r\n\r\n " +
|
||||
" return false;\r\n }\r\n\r\n " +
|
||||
" $(\'#Config_System_AD_SearchScope_Update\').click(update);\r\n " +
|
||||
" });\r\n </script>\r\n");
|
||||
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 427 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
#line 433 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1316,7 +1335,7 @@ WriteLiteral("\', null, function (data) {\r\n\r\n\r\n
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n </table>\r\n</div>\r\n");
|
||||
|
||||
|
||||
#line 432 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
#line 438 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
if (canConfigProxy)
|
||||
{
|
||||
using (Html.BeginForm(MVC.API.System.UpdateProxySettings()))
|
||||
@@ -1341,7 +1360,7 @@ WriteLiteral(">Address:\r\n </th>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 443 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
#line 449 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
Write(Html.EditorFor(m => m.ProxyAddress));
|
||||
|
||||
|
||||
@@ -1352,7 +1371,7 @@ WriteLiteral("<br />\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 444 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
#line 450 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.ProxyAddress));
|
||||
|
||||
|
||||
@@ -1368,7 +1387,7 @@ WriteLiteral(">Port:\r\n </th>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 451 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
#line 457 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
Write(Html.EditorFor(m => m.ProxyPort));
|
||||
|
||||
|
||||
@@ -1379,7 +1398,7 @@ WriteLiteral("<br />\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 452 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
#line 458 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.ProxyPort));
|
||||
|
||||
|
||||
@@ -1395,7 +1414,7 @@ WriteLiteral(">Username:\r\n </th>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 459 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
#line 465 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
Write(Html.EditorFor(m => m.ProxyUsername));
|
||||
|
||||
|
||||
@@ -1406,7 +1425,7 @@ WriteLiteral("<br />\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 460 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
#line 466 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.ProxyUsername));
|
||||
|
||||
|
||||
@@ -1422,7 +1441,7 @@ WriteLiteral(">Password:\r\n </th>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 467 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
#line 473 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
Write(Html.EditorFor(m => m.ProxyPassword));
|
||||
|
||||
|
||||
@@ -1433,7 +1452,7 @@ WriteLiteral("<br />\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 468 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
#line 474 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.ProxyPassword));
|
||||
|
||||
|
||||
@@ -1455,7 +1474,7 @@ WriteLiteral(" value=\"Save Proxy Settings\"");
|
||||
WriteLiteral(" />\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 480 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
#line 486 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1480,7 +1499,7 @@ WriteLiteral(">Address:\r\n </th>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 491 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
#line 497 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
Write(Html.DisplayFor(m => m.ProxyAddress));
|
||||
|
||||
|
||||
@@ -1496,7 +1515,7 @@ WriteLiteral(">Port:\r\n </th>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 498 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
#line 504 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
Write(Html.DisplayFor(m => m.ProxyPort));
|
||||
|
||||
|
||||
@@ -1512,7 +1531,7 @@ WriteLiteral(">Username:\r\n </th>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 505 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
#line 511 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
Write(Html.DisplayFor(m => m.ProxyUsername));
|
||||
|
||||
|
||||
@@ -1527,7 +1546,7 @@ WriteLiteral(">Password:\r\n </th>\r\n <td>*******
|
||||
"</td>\r\n </tr>\r\n </table>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 516 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
#line 522 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1542,7 +1561,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 518 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
#line 524 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Update Device Last Network Logons", MVC.API.System.UpdateLastNetworkLogonDates()));
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user