#pragma warning disable 1591 //------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.18051 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace Disco.Web.Areas.Config.Views.DeviceProfile { 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.BI.Extensions; using Disco.Models.Repository; using Disco.Web; using Disco.Web.Extensions; [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")] [System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceProfile/Show.cshtml")] public partial class Show : System.Web.Mvc.WebViewPage { public Show() { } public override void Execute() { #line 2 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Profiles", MVC.Config.DeviceProfile.Index(null), Model.DeviceProfile.ToString()); Html.BundleDeferred("~/Style/jQueryUI/dynatree"); Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-DynaTree"); #line default #line hidden WriteLiteral("\r\n\r\n \r\n \r\n \r\n " + " \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Id:\r\n \r\n"); WriteLiteral(" "); #line 13 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.DisplayFor(model => model.DeviceProfile.Id)); #line default #line hidden WriteLiteral("\r\n
Name:\r\n " + " "); #line 19 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.TextBoxFor(model => model.DeviceProfile.Name)); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 20 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxSave()); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 21 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxLoader()); #line default #line hidden WriteLiteral("\r\n $(function () { var $Name = $('#DeviceProfile_Name'); var $NameAjaxSave = $Name.next('.ajaxSave'); $Name .watermark('Profile Short Name') .focus(function () { $Name.select() }) .keydown(function (e) { $NameAjaxSave.show(); if (e.which == 13) { $(this).blur(); } }).blur(function () { $NameAjaxSave.hide(); }) .change(function () { $NameAjaxSave.hide(); var $ajaxLoading = $NameAjaxSave.next('.ajaxLoading').show(); var data = { ProfileName: $Name.val() }; $.ajax({ url: '"); #line 42 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Url.Action(MVC.API.DeviceProfile.UpdateName(Model.DeviceProfile.Id))); #line default #line hidden WriteLiteral(@"', dataType: 'json', data: data, success: function (d) { if (d == 'OK') { $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); } else { $ajaxLoading.hide(); alert('Unable to update name: ' + d); } }, error: function (jqXHR, textStatus, errorThrown) { alert('Unable to update name: ' + textStatus); $ajaxLoading.hide(); } }); }); });
Short Name: "); #line 66 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.TextBoxFor(model => model.DeviceProfile.ShortName)); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 67 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxSave()); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 68 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxLoader()); #line default #line hidden WriteLiteral("\r\n $(function () { var $ShortName = $('#DeviceProfile_ShortName'); var $ShortNameAjaxSave = $ShortName.next('.ajaxSave'); $ShortName .watermark('Profile Short Name') .focus(function () { $ShortName.select() }) .keydown(function (e) { $ShortNameAjaxSave.show(); if (e.which == 13) { $(this).blur(); } }).blur(function () { $ShortNameAjaxSave.hide(); }) .change(function () { $ShortNameAjaxSave.hide(); var $ajaxLoading = $ShortNameAjaxSave.next('.ajaxLoading').show(); var data = { ShortName: $ShortName.val() }; $.ajax({ url: '"); #line 89 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Url.Action(MVC.API.DeviceProfile.UpdateShortName(Model.DeviceProfile.Id))); #line default #line hidden WriteLiteral(@"', dataType: 'json', data: data, success: function (d) { if (d == 'OK') { $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); } else { $ajaxLoading.hide(); alert('Unable to update short name: ' + d); } }, error: function (jqXHR, textStatus, errorThrown) { alert('Unable to update short name: ' + textStatus); $ajaxLoading.hide(); } }); }); });
Description: "); #line 113 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.TextBoxFor(model => model.DeviceProfile.Description)); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 114 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxSave()); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 115 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxLoader()); #line default #line hidden WriteLiteral("\r\n $(function () { var $Description = $('#DeviceProfile_Description'); var $DescriptionAjaxSave = $Description.next('.ajaxSave'); $Description .watermark('Profile Description') .focus(function () { $Description.select() }) .keydown(function (e) { $DescriptionAjaxSave.show(); if (e.which == 13) { $(this).blur(); } }).blur(function () { $DescriptionAjaxSave.hide(); }) .change(function () { $DescriptionAjaxSave.hide(); var $ajaxLoading = $DescriptionAjaxSave.next('.ajaxLoading').show(); var data = { Description: $Description.val() }; $.ajax({ url: '"); #line 136 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Url.Action(MVC.API.DeviceProfile.UpdateDescription(Model.DeviceProfile.Id))); #line default #line hidden WriteLiteral(@"', dataType: 'json', data: data, success: function (d) { if (d == 'OK') { $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); } else { $ajaxLoading.hide(); alert('Unable to update description: ' + d); } }, error: function (jqXHR, textStatus, errorThrown) { alert('Unable to update description: ' + textStatus); $ajaxLoading.hide(); } }); }); });
Members
"); #line 160 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Model.DeviceCount.ToString("n0")); #line default #line hidden WriteLiteral(" "); #line 160 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Model.DeviceCount == 1 ? "devices is a member" : "devices are members"); #line default #line hidden WriteLiteral(" of this profile.
\r\n"); #line 161 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden #line 161 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (Model.DeviceDecommissionedCount > 0) { #line default #line hidden WriteLiteral(" "); #line 163 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Model.DeviceDecommissionedCount.ToString("n0")); #line default #line hidden WriteLiteral(" "); #line 163 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Model.DeviceDecommissionedCount == 1 ? "device is" : "devices are"); #line default #line hidden WriteLiteral(" decommissioned.\r\n"); #line 164 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } #line default #line hidden WriteLiteral("
Distribution Type" + ":\r\n \r\n"); WriteLiteral(" "); #line 171 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.DropDownList("DeviceProfile_DistributionType", Model.DeviceProfileDistributionTypes)); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 172 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxLoader()); #line default #line hidden WriteLiteral("\r\n $(function () { $('#DeviceProfile_DistributionType').change(function () { var $this = $(this); var $ajaxLoading = $this.next('.ajaxLoading').show(); var data = { DistributionType: $this.val() }; $.getJSON('"); #line 179 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Url.Action(MVC.API.DeviceProfile.UpdateDistributionType(Model.DeviceProfile.Id))); #line default #line hidden WriteLiteral(@"', data, function (response, result) { if (result != 'success' || response != 'OK') { alert('Unable to change Distribution Type:\n' + response); $ajaxLoading.hide(); } else { $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); } }); }); });
Address: "); WriteLiteral(" "); #line 196 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.DropDownListFor(m => m.DeviceProfile.DefaultOrganisationAddress, Model.OrganisationAddresses.ToSelectListItems(Model.DeviceProfile.DefaultOrganisationAddress, true, "None"))); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 197 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxLoader()); #line default #line hidden WriteLiteral("\r\n $(function () { $('#DeviceProfile_DefaultOrganisationAddress').change(function () { var $this = $(this); var $ajaxLoading = $this.next('.ajaxLoading').show(); var data = { DefaultOrganisationAddress: $this.val() }; $.getJSON('"); #line 204 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Url.Action(MVC.API.DeviceProfile.UpdateDefaultOrganisationAddress(Model.DeviceProfile.Id))); #line default #line hidden WriteLiteral(@"', data, function (response, result) { if (result != 'success' || response != 'OK') { alert('Unable to change Address:\n' + response); $ajaxLoading.hide(); } else { $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); } }); }); });
Allocate Certificates: "); WriteLiteral(" "); #line 221 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.DropDownListFor(model => model.DeviceProfile.CertificateProviderId, Model.CertificateProviders.ToSelectListItems(null, true, "Not Allocated"))); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 222 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxLoader()); #line default #line hidden WriteLiteral("\r\n $(function () { var $field = $('#DeviceProfile_CertificateProviderId'); var $ajaxLoading = $field.next('.ajaxLoading'); $field .change(function () { $ajaxLoading.show(); var data = { CertificateProviderId: $field.val() }; $.ajax({ url: '"); #line 232 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Url.Action(MVC.API.DeviceProfile.UpdateCertificateProviderId(Model.DeviceProfile.Id))); #line default #line hidden WriteLiteral(@"', dataType: 'json', data: data, success: function (d) { if (d == 'OK') { $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); } else { $ajaxLoading.hide(); alert('Unable to update Certificate Provider Id: ' + d); } }, error: function (jqXHR, textStatus, errorThrown) { alert('Unable to update Certificate Provider Id: ' + textStatus); $ajaxLoading.hide(); } }); }); });
Computer Name Template Expression: "); #line 256 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.TextBoxFor(model => model.DeviceProfile.ComputerNameTemplate)); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 257 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxSave()); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 258 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxLoader()); #line default #line hidden WriteLiteral("\r\n (Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser()) #line default #line hidden , 13817), false) ); WriteLiteral("> \r\n $(function () { var $ComputerNameTemplate = $('#DeviceProfile_ComputerNameTemplate'); var $ajaxSave = $ComputerNameTemplate.next('.ajaxSave'); $ComputerNameTemplate .focus(function () { $ComputerNameTemplate.select() }) .keydown(function (e) { $ajaxSave.show(); if (e.which == 13) { $(this).blur(); } }).blur(function () { $ajaxSave.hide(); }) .change(function () { $ajaxSave.hide(); var $ajaxLoading = $ajaxSave.next('.ajaxLoading').show(); var data = { ComputerNameTemplate: $ComputerNameTemplate.val() }; $.ajax({ url: '"); #line 279 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Url.Action(MVC.API.DeviceProfile.UpdateComputerNameTemplate(Model.DeviceProfile.Id))); #line default #line hidden WriteLiteral(@"', dataType: 'json', data: data, success: function (d) { if (d == 'OK') { $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); } else { $ajaxLoading.hide(); alert('Unable to update computer name template: ' + d); } }, error: function (jqXHR, textStatus, errorThrown) { alert('Unable to update computer name template: ' + textStatus); $ajaxLoading.hide(); } }); }); }); \r\n \r\n Provision Active Directory Account:\r\n " + " \r\n
Default Organisational Unit: "); WriteLiteral(" "); #line 352 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.HiddenFor(model => model.DeviceProfile.OrganisationalUnit)); #line default #line hidden WriteLiteral("\r\n \r\n \r\n Change"); #line 355 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxLoader()); #line default #line hidden WriteLiteral("\r\n \r\n \r\n \r\n \r\n $(function () { var ouValue = $('#DeviceProfile_OrganisationalUnit'); var ouDisplay = $('#displayOrganisationalUnit'); var ouTree = $('#treeOrganisationalUnit'); var ouChangeLink = $('#changeOrganisationalUnit'); var ouTreeLoaded = false; var ouFriendlyName = function (ou) { return ou.replace(/ou=/gi, '').split(',').reverse().join(' > '); }; var updateDisplayOrganisationalUnit = function () { var value = ouValue.val(); if (value) { ouDisplay.text(ouFriendlyName(value)); } else { ouDisplay.text('{Default Computers Container}'); } }; var ouSet = function (ou) { $ajaxLoading = ouChangeLink.next('.ajaxLoading').show(); var data = { OrganisationalUnit: ou }; $.getJSON('"); #line 381 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Url.Action(MVC.API.DeviceProfile.UpdateOrganisationalUnit(Model.DeviceProfile.Id, null))); #line default #line hidden WriteLiteral("\', data, function (response, result) {\r\n if (resul" + "t != \'success\' || response != \'OK\') {\r\n alert" + "(\'Unable to change Organisational Unit:\\n\' + response);\r\n " + " $ajaxLoading.hide();\r\n } else {\r\n " + " ouValue.val(ou);\r\n " + " updateDisplayOrganisationalUnit();\r\n $" + "ajaxLoading.hide().next(\'.ajaxOk\').show().delay(\'fast\').fadeOut(\'slow\');\r\n " + " }\r\n });\r\n " + " }\r\n var ouUpdateTree = function () {\r\n " + " var dynaTree = ouTree.dynatree(\"getTree\");\r\n " + " var value = ouValue.val();\r\n if (value) {\r\n " + " dynaTree.activateKey(value);\r\n " + " } else {\r\n var activeNode = dynaTree.getAc" + "tiveNode();\r\n if (activeNode)\r\n " + " activeNode.deactivate();\r\n }\r\n " + " }\r\n\r\n var ouDialog = $(\'#dialogOrganis" + "ationalUnit\').dialog({\r\n autoOpen: false,\r\n " + " buttons: {\r\n \'Use Default Conta" + "iner\': function () {\r\n ouSet(\'\');\r\n " + " $(this).dialog(\"close\");\r\n " + " },\r\n \'Save\': function () {\r\n " + " var node = ouTree.dynatree(\"getTree\").getActiveNode();\r\n " + " if (node) {\r\n " + " ouSet(node.data.key);\r\n $(this).dialo" + "g(\"close\");\r\n } else {\r\n " + " alert(\'Select an Organisational Unit to Save\')\r\n " + " }\r\n }\r\n " + " },\r\n draggable: false,\r\n " + " modal: true,\r\n resizable: false,\r\n " + " width: 400,\r\n height: 400\r\n " + " });\r\n\r\n var ouChange = function () {\r\n " + " if (!ouTreeLoaded) {\r\n $." + "getJSON(\'"); #line 430 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Url.Action(MVC.API.DeviceProfile.OrganisationalUnits())); #line default #line hidden WriteLiteral("\', null, function (data) {\r\n var dynatreeDataTrans" + "former = function (element) {\r\n var child = {" + "\r\n title: element.Name,\r\n " + " key: element.Path,\r\n " + " isFolder: true\r\n }\r\n " + " if (element.Children) {\r\n " + "child.children = [];\r\n for (var i = 0; i " + "< element.Children.length; i++) {\r\n c" + "hild.children.push(dynatreeDataTransformer(element.Children[i]));\r\n " + " }\r\n }\r\n " + " return child;\r\n };\r\n " + " var dynatreeData = [];\r\n " + " for (var i = 0; i < data.length; i++) {\r\n " + " dynatreeData.push(dynatreeDataTransformer(data[i]));\r\n " + " }\r\n\r\n ouTree.dynatree({\r\n " + " children: dynatreeData,\r\n " + "onActivate: function (node) {\r\n //alert(\'" + "node selected: \' + node.data.key);\r\n }\r\n " + " });\r\n ouTreeLoaded = t" + "rue;\r\n ouUpdateTree();\r\n " + " });\r\n } else {\r\n ouUpdateTr" + "ee();\r\n }\r\n ouDialog.dialog(\'o" + "pen\');\r\n };\r\n\r\n ouChangeLink.click" + "(ouChange);\r\n updateDisplayOrganisationalUnit();\r\n " + " });\r\n \r\n \r\n \r\n Enforce:\r\n \r\n " + "
\r\n

\r\n \r\n This item will be permanently deleted and cannot be recovered. " + "Are you sure?\r\n

\r\n\r\n $(function () { var button = $('#buttonDelete'); var buttonLink = button.attr('href'); button.attr('href', '#'); button.click(function () { $(""#dialogConfirmDelete"").dialog('open'); }); $(""#dialogConfirmDelete"").dialog({ resizable: false, height: 140, modal: true, autoOpen: false, buttons: { ""Delete"": function () { $(this).dialog('disable'); window.location.href = buttonLink; }, Cancel: function () { $(this).dialog(""close""); } } }); }); \r\n"); #line 532 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden #line 532 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (Model.CanDelete) { #line default #line hidden #line 534 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.ActionLinkButton("Delete", MVC.API.DeviceProfile.Delete(Model.DeviceProfile.Id, true), "buttonDelete")); #line default #line hidden #line 534 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } #line default #line hidden WriteLiteral(" "); #line 536 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.ActionLinkButton("Export Devices", MVC.API.DeviceProfile.ExportDevices(Model.DeviceProfile.Id))); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 537 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceProfile.Id.ToString(), "DeviceProfile"))); #line default #line hidden WriteLiteral("\r\n\r\n"); } } } #pragma warning restore 1591