#pragma warning disable 1591 //------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.17929 // // 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", "1.5.0.0")] [System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceProfile/Show.cshtml")] public 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 Id:\r\n " + "\r\n"); WriteLiteral(" "); #line 14 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.DisplayFor(model => model.DeviceProfile.Id)); #line default #line hidden WriteLiteral("\r\n
\r\n " + " Name:\r\n "); #line 21 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.TextBoxFor(model => model.DeviceProfile.Name)); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 22 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxSave()); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 23 "..\..\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 44 "..\..\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 69 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.TextBoxFor(model => model.DeviceProfile.ShortName)); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 70 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxSave()); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 71 "..\..\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 92 "..\..\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 117 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.TextBoxFor(model => model.DeviceProfile.Description)); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 118 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxSave()); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 119 "..\..\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 140 "..\..\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(); } }); }); });
Distribution Type: "); WriteLiteral(" "); #line 166 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.DropDownList("DeviceProfile_DistributionType", Model.DeviceProfileDistributionTypes)); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 167 "..\..\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 174 "..\..\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 192 "..\..\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 193 "..\..\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 200 "..\..\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 218 "..\..\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 219 "..\..\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 229 "..\..\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 254 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.TextBoxFor(model => model.DeviceProfile.ComputerNameTemplate)); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 255 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxSave()); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 256 "..\..\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 , 13411), false) ); WriteLiteral(">\r\n  \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 278 "..\..\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 dynatreeDataT" + "ransformer = function (element) {\r\n var c" + "hild = {\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 " + " child.children.push(dynatreeDataTransform" + "er(element.Children[i]));\r\n }\r\n " + " }\r\n ret" + "urn child;\r\n };\r\n " + " var dynatreeData = [];\r\n for (var i =" + " 0; i < data.length; i++) {\r\n dynatreeDat" + "a.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 = true;\r\n ouUpdateTree();\r\n " + " });\r\n } else {\r\n " + " ouUpdateTree();\r\n }\r\n " + " ouDialog.dialog(\'open\');\r\n };\r\n\r\n " + " ouChangeLink.click(ouChange);\r\n upd" + "ateDisplayOrganisationalUnit();\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 $(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 531 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden #line 531 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (Model.CanDelete) { #line default #line hidden #line 533 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.ActionLinkButton("Delete", MVC.API.DeviceProfile.Delete(Model.DeviceProfile.Id, true), "buttonDelete")); #line default #line hidden #line 533 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } #line default #line hidden WriteLiteral(" "); #line 535 "..\..\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