09c2a24222
Refactor to target specific Domain Controllers, with failover.
2079 lines
73 KiB
C#
2079 lines
73 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.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;
|
|
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/DeviceProfile/Show.cshtml")]
|
|
public partial class Show : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.DeviceProfile.ShowModel>
|
|
{
|
|
public Show()
|
|
{
|
|
}
|
|
public override void Execute()
|
|
{
|
|
|
|
#line 2 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
Authorization.Require(Claims.Config.DeviceProfile.Show);
|
|
|
|
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Profiles", MVC.Config.DeviceProfile.Index(null), Model.DeviceProfile.ToString());
|
|
|
|
var canConfig = Authorization.Has(Claims.Config.DeviceProfile.Configure);
|
|
var canConfigExpression = Authorization.Has(Claims.Config.DeviceProfile.ConfigureComputerNameTemplate);
|
|
var canDelete = (Authorization.Has(Claims.Config.DeviceProfile.Delete) && Model.CanDelete);
|
|
|
|
if (canConfig)
|
|
{
|
|
Html.BundleDeferred("~/Style/Fancytree");
|
|
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-Fancytree");
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n<div");
|
|
|
|
WriteLiteral(" id=\"configurationDeviceProfileShow\"");
|
|
|
|
WriteLiteral(" class=\"form\"");
|
|
|
|
WriteLiteral(" style=\"width: 640px\"");
|
|
|
|
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" style=\"width: 170px;\"");
|
|
|
|
WriteLiteral(">Id:\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 23 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.DisplayFor(model => model.DeviceProfile.Id));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>Name:\r\n " +
|
|
" </th>\r\n <td>");
|
|
|
|
|
|
#line 29 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 31 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.TextBoxFor(model => model.DeviceProfile.Name));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 31 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 32 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 32 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 33 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 33 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(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 54 "..\..\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();
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 73 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 76 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.Name);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 76 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Short Name:\r\n " +
|
|
" </th>\r\n <td>");
|
|
|
|
|
|
#line 83 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 85 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.TextBoxFor(model => model.DeviceProfile.ShortName));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 85 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 86 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 86 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 87 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 87 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(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 108 "..\..\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();
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 127 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 130 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.ShortName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 130 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Description:\r\n " +
|
|
" </th>\r\n <td>");
|
|
|
|
|
|
#line 137 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 139 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.TextBoxFor(model => model.DeviceProfile.Description));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 139 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 140 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 140 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 141 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 141 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(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 162 "..\..\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();
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 181 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 184 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.Description);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 184 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Members</th>\r\n " +
|
|
" <td>\r\n <div><strong>");
|
|
|
|
|
|
#line 191 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceCount.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</strong> ");
|
|
|
|
|
|
#line 191 "..\..\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.</div>\r\n");
|
|
|
|
|
|
#line 192 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 192 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (Model.DeviceDecommissionedCount > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 194 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceDecommissionedCount.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 194 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceDecommissionedCount == 1 ? "device is" : "devices are");
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" decommissioned.</div>\r\n");
|
|
|
|
|
|
#line 195 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Distribution Type" +
|
|
":\r\n </th>\r\n <td>");
|
|
|
|
|
|
#line 201 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 203 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.DropDownList("DeviceProfile_DistributionType", Model.DeviceProfileDistributionTypes));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 203 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 204 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 204 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
$('#DeviceProfile_DistributionType').change(function () {
|
|
var $this = $(this);
|
|
var $ajaxLoading = $this.next('.ajaxLoading').show();
|
|
var data = { DistributionType: $this.val() };
|
|
$.getJSON('");
|
|
|
|
|
|
#line 211 "..\..\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');
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 222 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 225 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.DistributionType.ToString());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 225 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Address:\r\n " +
|
|
" </th>\r\n <td>");
|
|
|
|
|
|
#line 232 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 234 "..\..\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
|
|
|
|
#line 234 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 235 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 235 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
$('#DeviceProfile_DefaultOrganisationAddress').change(function () {
|
|
var $this = $(this);
|
|
var $ajaxLoading = $this.next('.ajaxLoading').show();
|
|
var data = { DefaultOrganisationAddress: $this.val() };
|
|
$.getJSON('");
|
|
|
|
|
|
#line 242 "..\..\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');
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 253 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (Model.DefaultOrganisationAddress == null)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Specified></span>\r\n");
|
|
|
|
|
|
#line 259 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 262 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DefaultOrganisationAddress.ToString());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 262 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Allocate Certific" +
|
|
"ates:\r\n </th>\r\n <td>");
|
|
|
|
|
|
#line 270 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 272 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.DropDownListFor(model => model.DeviceProfile.CertificateProviderId, Model.CertificateProviders.ToSelectListItems(null, true, "Not Allocated")));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 272 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 273 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 273 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
var $field = $('#DeviceProfile_CertificateProviderId');
|
|
var $ajaxLoading = $field.next('.ajaxLoading');
|
|
$field
|
|
.change(function () {
|
|
$ajaxLoading.show();
|
|
var data = { CertificateProviderId: $field.val() };
|
|
$.ajax({
|
|
url: '");
|
|
|
|
|
|
#line 283 "..\..\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();
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 302 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (string.IsNullOrEmpty(Model.DeviceProfile.CertificateProviderId))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Allocated></span>\r\n");
|
|
|
|
|
|
#line 308 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
var cp = Model.CertificateProviders.FirstOrDefault(p => p.Id == Model.DeviceProfile.CertificateProviderId);
|
|
if (cp == null)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Allocated></span>\r\n");
|
|
|
|
|
|
#line 315 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 318 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(cp.Name);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 318 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Computer Name<br " +
|
|
"/>\r\n Template Expression:\r\n </th>\r\n <td>");
|
|
|
|
|
|
#line 328 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig && canConfigExpression)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 330 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.TextBoxFor(model => model.DeviceProfile.ComputerNameTemplate));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 330 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 331 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 331 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 332 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 332 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <a");
|
|
|
|
WriteLiteral(" id=\"expressionBrowserAnchor\"");
|
|
|
|
WriteAttribute("href", Tuple.Create(" href=\"", 16270), Tuple.Create("\"", 16339)
|
|
|
|
#line 333 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 16277), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser())
|
|
|
|
#line default
|
|
#line hidden
|
|
, 16277), false)
|
|
);
|
|
|
|
WriteLiteral("> </a>\r\n");
|
|
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(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 353 "..\..\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();
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 372 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"displayComputerNameTemplate\"");
|
|
|
|
WriteLiteral(" class=\"code\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 376 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 376 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (string.IsNullOrWhiteSpace(Model.DeviceProfile.ComputerNameTemplate))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Specified></span>\r\n");
|
|
|
|
|
|
#line 379 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 382 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.ComputerNameTemplate);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 382 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n");
|
|
|
|
|
|
#line 385 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" style=\"margin-top: 8px;\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 387 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 387 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_EnforceComputerNameConvention\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 389 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.EnforceComputerNameConvention ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("/>\r\n");
|
|
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
$('#DeviceProfile_EnforceComputerNameConvention').click(function () {
|
|
var $this = $(this);
|
|
var $ajaxLoading = $this.nextAll('.ajaxLoading').show();
|
|
var data = { EnforceComputerNameConvention: $this.is(':checked') };
|
|
$.getJSON('");
|
|
|
|
|
|
#line 396 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceProfile.UpdateEnforceComputerNameConvention(Model.DeviceProfile.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"', data, function (response, result) {
|
|
if (result != 'success' || response != 'OK') {
|
|
alert('Unable to change Enforce Computer Name Convention:\n' + response);
|
|
$ajaxLoading.hide();
|
|
} else {
|
|
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 407 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_EnforceComputerNameConvention\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 410 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.EnforceComputerNameConvention ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" disabled=\"disabled\" />\r\n");
|
|
|
|
|
|
#line 411 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <label");
|
|
|
|
WriteLiteral(" for=\"DeviceProfile_EnforceComputerNameConvention\"");
|
|
|
|
WriteLiteral(">\r\n Enforce Naming Convention\r\n </label" +
|
|
">\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 415 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n <div");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(" style=\"margin-top: 8px;\"");
|
|
|
|
WriteLiteral(">\r\n Note: Computer names are only changed when Active Director" +
|
|
"y accounts are provisioned.\r\n </div>\r\n </td>\r\n " +
|
|
"</tr>\r\n <tr>\r\n <th>Policies</th>\r\n <td>\r\n " +
|
|
" <div>\r\n");
|
|
|
|
|
|
#line 426 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 426 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_ProvisionADAccount\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 428 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.ProvisionADAccount ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("/>\r\n");
|
|
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
$('#DeviceProfile_ProvisionADAccount').click(function () {
|
|
var $this = $(this);
|
|
var $ajaxLoading = $this.nextAll('.ajaxLoading').show();
|
|
var data = { ProvisionADAccount: $this.is(':checked') };
|
|
$.getJSON('");
|
|
|
|
|
|
#line 435 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceProfile.UpdateProvisionADAccount(Model.DeviceProfile.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"', data, function (response, result) {
|
|
if (result != 'success' || response != 'OK') {
|
|
alert('Unable to change Provision AD Account:\n' + response);
|
|
$ajaxLoading.hide();
|
|
} else {
|
|
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 446 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_ProvisionADAccount\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 449 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.ProvisionADAccount ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" disabled=\"disabled\" />\r\n");
|
|
|
|
|
|
#line 450 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <label");
|
|
|
|
WriteLiteral(" for=\"DeviceProfile_ProvisionADAccount\"");
|
|
|
|
WriteLiteral(">\r\n Provision Active Directory Account\r\n " +
|
|
" </label>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 454 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n <div");
|
|
|
|
WriteLiteral(" style=\"margin-top: 8px;\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 457 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 457 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_AssignedUserLocalAdmin\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 459 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.AssignedUserLocalAdmin ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("/>\r\n");
|
|
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
$('#DeviceProfile_AssignedUserLocalAdmin').click(function () {
|
|
var $this = $(this);
|
|
var $ajaxLoading = $this.nextAll('.ajaxLoading').show();
|
|
var data = { AssignedUserLocalAdmin: $this.is(':checked') };
|
|
$.getJSON('");
|
|
|
|
|
|
#line 466 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceProfile.UpdateAssignedUserLocalAdmin(Model.DeviceProfile.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"', data, function (response, result) {
|
|
if (result != 'success' || response != 'OK') {
|
|
alert('Unable to change Assigned User Is Local Administrator:\n' + response);
|
|
$ajaxLoading.hide();
|
|
} else {
|
|
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 477 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_AssignedUserLocalAdmin\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 480 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.AssignedUserLocalAdmin ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" disabled=\"disabled\" />\r\n");
|
|
|
|
|
|
#line 481 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <label");
|
|
|
|
WriteLiteral(" for=\"DeviceProfile_AssignedUserLocalAdmin\"");
|
|
|
|
WriteLiteral(">\r\n Assigned User is Local Administrator\r\n " +
|
|
" </label>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 485 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n <div");
|
|
|
|
WriteLiteral(" style=\"margin-top: 8px;\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 488 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 488 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_AllowUntrustedReimageJobEnrolment\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 490 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.AllowUntrustedReimageJobEnrolment ? new MvcHtmlString("checked=\"checked\" ") : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("/>\r\n");
|
|
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
$('#DeviceProfile_AllowUntrustedReimageJobEnrolment').click(function () {
|
|
var $this = $(this);
|
|
var $ajaxLoading = $this.nextAll('.ajaxLoading').show();
|
|
var data = { AllowUntrustedReimageJobEnrolment: $this.is(':checked') };
|
|
$.getJSON('");
|
|
|
|
|
|
#line 497 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceProfile.UpdateAllowUntrustedReimageJobEnrolment(Model.DeviceProfile.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"', data, function (response, result) {
|
|
if (result != 'success' || response != 'OK') {
|
|
alert('Unable to change Allow Untrusted Reimage Job Enrolment:\n' + response);
|
|
$ajaxLoading.hide();
|
|
} else {
|
|
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 508 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_AllowUntrustedReimageJobEnrolment\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 511 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.AllowUntrustedReimageJobEnrolment ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" disabled=\"disabled\" />\r\n");
|
|
|
|
|
|
#line 512 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <label");
|
|
|
|
WriteLiteral(" for=\"DeviceProfile_AllowUntrustedReimageJobEnrolment\"");
|
|
|
|
WriteLiteral(">\r\n Allow Untrusted Enrolment Where a <span");
|
|
|
|
WriteLiteral(" class=\"code\"");
|
|
|
|
WriteLiteral(">\'Software - Reimage\'</span> Job is Open\r\n </label>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 516 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
|
" <th>Organisational Unit:\r\n </th>\r\n <td>");
|
|
|
|
|
|
#line 523 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_OrganisationalUnit\"");
|
|
|
|
WriteLiteral(" class=\"code\"");
|
|
|
|
WriteLiteral(" data-value=\"");
|
|
|
|
|
|
#line 525 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.OrganisationalUnit);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(">\r\n <span>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 527 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.FriendlyOrganisationalUnitName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </span>\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" <a");
|
|
|
|
WriteLiteral(" id=\"changeOrganisationalUnit\"");
|
|
|
|
WriteLiteral(" href=\"#\"");
|
|
|
|
WriteLiteral(" class=\"button small\"");
|
|
|
|
WriteLiteral(">Change</a>");
|
|
|
|
|
|
#line 530 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 530 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 530 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"dialogOrganisationalUnit\"");
|
|
|
|
WriteLiteral(" title=\"Organisational Unit\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteLiteral(">\r\n <div");
|
|
|
|
WriteLiteral(" id=\"dialogOrganisationalUnit_Loading\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 533 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" Loading Organisational Units\r\n </div>\r\n <d" +
|
|
"iv");
|
|
|
|
WriteLiteral(" id=\"treeOrganisationalUnit\"");
|
|
|
|
WriteLiteral(" class=\"organisationalUnitTree\"");
|
|
|
|
WriteLiteral(">\r\n </div>\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(">\r\n $(function () {\r\n var ouSetUrl = \'");
|
|
|
|
|
|
#line 540 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceProfile.UpdateOrganisationalUnit(Model.DeviceProfile.Id, null, true)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\';\r\n var ouValue = $(\'#DeviceProfile_OrganisationalUnit\')." +
|
|
"attr(\'data-value\');\r\n var $ouTree = null;\r\n " +
|
|
" var ouTree = null;\r\n var $dialog = null;\r\n " +
|
|
" var ouSet = function (ou) {\r\n var " +
|
|
"url = ouSetUrl + \'&\' + $.param({ OrganisationalUnit: ou })\r\n " +
|
|
" window.location.href = url;\r\n }\r\n " +
|
|
" var expandNodeTree = function (node) {\r\n var " +
|
|
"parent = node.parent;\r\n if (parent) {\r\n " +
|
|
" expandNodeTree(parent);\r\n paren" +
|
|
"t.setExpanded(true, { noAnimation: true, noEvents: false });\r\n " +
|
|
" }\r\n }\r\n var expandAndFoc" +
|
|
"usNode = function (nodeKey) {\r\n if (ouTree) {\r\n " +
|
|
" var ouNode = ouTree.getNodeByKey(ouValue);\r\n " +
|
|
" if (ouNode) {\r\n expandN" +
|
|
"odeTree(ouNode);\r\n ouNode.setFocus(true);\r\n " +
|
|
" ouNode.setActive(true);\r\n\r\n " +
|
|
" var li = ouNode.li;\r\n var li" +
|
|
"Offset = li.offsetParent;\r\n if (li.offsetTop " +
|
|
"+ li.offsetHeight > liOffset.offsetHeight)\r\n " +
|
|
" $(liOffset).animate({ \'scrollTop\': li.offsetTop - liOffset.offsetHeight + li" +
|
|
".offsetHeight + 4 }, \'fast\');\r\n }\r\n " +
|
|
" }\r\n }\r\n var ouChange" +
|
|
" = function () {\r\n if (!$dialog) {\r\n\r\n " +
|
|
" $dialog = $(\'#dialogOrganisationalUnit\').dialog({\r\n " +
|
|
" autoOpen: false,\r\n bu" +
|
|
"ttons: null,\r\n draggable: false,\r\n " +
|
|
" modal: true,\r\n resiz" +
|
|
"able: false,\r\n width: 500,\r\n " +
|
|
" height: 500\r\n });\r\n " +
|
|
" $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 590 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.System.DomainOrganisationalUnits()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
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 650 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"displayOrganisationalUnit\"");
|
|
|
|
WriteLiteral(" class=\"code\"");
|
|
|
|
WriteLiteral(">\r\n <span>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 655 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.FriendlyOrganisationalUnitName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </span>\r\n </div>\r\n");
|
|
|
|
|
|
#line 658 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" style=\"margin-top: 8px;\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 660 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 660 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_EnforceOrganisationalUnit\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 662 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.EnforceOrganisationalUnit ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("/>\r\n");
|
|
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
$('#DeviceProfile_EnforceOrganisationalUnit').click(function () {
|
|
var $this = $(this);
|
|
var $ajaxLoading = $this.nextAll('.ajaxLoading').show();
|
|
var data = { EnforceOrganisationalUnit: $this.is(':checked') };
|
|
$.getJSON('");
|
|
|
|
|
|
#line 669 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceProfile.UpdateEnforceOrganisationalUnit(Model.DeviceProfile.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"', data, function (response, result) {
|
|
if (result != 'success' || response != 'OK') {
|
|
alert('Unable to change Enforce Organisation Unit:\n' + response);
|
|
$ajaxLoading.hide();
|
|
} else {
|
|
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 680 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_EnforceOrganisationalUnit\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 683 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.EnforceOrganisationalUnit ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" disabled=\"disabled\" />\r\n");
|
|
|
|
|
|
#line 684 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <label");
|
|
|
|
WriteLiteral(" for=\"DeviceProfile_EnforceOrganisationalUnit\"");
|
|
|
|
WriteLiteral(">\r\n Enforce Organisational Unit\r\n </lab" +
|
|
"el>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 688 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>\r" +
|
|
"\n");
|
|
|
|
|
|
#line 694 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canDelete)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"dialogConfirmDelete\"");
|
|
|
|
WriteLiteral(" title=\"Delete this Device Profile?\"");
|
|
|
|
WriteLiteral(">\r\n <p>\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg warning\"");
|
|
|
|
WriteLiteral("></i>\r\n This item will be permanently deleted and cannot be recovered." +
|
|
" Are you sure?\r\n </p>\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(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"");
|
|
}
|
|
}
|
|
});
|
|
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 730 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<div");
|
|
|
|
WriteLiteral(" class=\"actionBar\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 732 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 732 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canDelete)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 734 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.ActionLinkButton("Delete", MVC.API.DeviceProfile.Delete(Model.DeviceProfile.Id, true), "buttonDelete"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 734 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 736 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (Authorization.Has(Claims.Device.Actions.Export))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 738 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.ActionLinkButton("Export Devices", MVC.API.DeviceProfile.ExportDevices(Model.DeviceProfile.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 738 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 740 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (Authorization.Has(Claims.Device.Search))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 742 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceProfile.Id.ToString(), "DeviceProfile")));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 742 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n");
|
|
|
|
}
|
|
}
|
|
}
|
|
#pragma warning restore 1591
|