3330 lines
117 KiB
C#
3330 lines
117 KiB
C#
#pragma warning disable 1591
|
|
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by a tool.
|
|
// Runtime Version:4.0.30319.42000
|
|
//
|
|
// 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.Models.Repository;
|
|
using Disco.Services;
|
|
using Disco.Services.Authorization;
|
|
|
|
#line 2 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
using Disco.Services.Devices.ManagedGroups;
|
|
|
|
#line default
|
|
#line hidden
|
|
using Disco.Services.Web;
|
|
using Disco.Web;
|
|
|
|
#line 3 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
using Disco.Web.Areas.Config.Models.Shared;
|
|
|
|
#line default
|
|
#line hidden
|
|
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 4 "..\..\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);
|
|
var canViewPlugins = Authorization.Has(Claims.Config.Plugin.Install);
|
|
|
|
var hideAdvanced =
|
|
Model.DeviceProfile.AssignedUsersLinkedGroup == null &&
|
|
Model.DeviceProfile.DevicesLinkedGroup == null;
|
|
|
|
if (canConfig)
|
|
{
|
|
Html.BundleDeferred("~/Style/Fancytree");
|
|
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-Fancytree");
|
|
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n<div");
|
|
|
|
WriteLiteral(" id=\"configurationDeviceProfileShow\"");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 1194), Tuple.Create("\"", 1253)
|
|
, Tuple.Create(Tuple.Create("", 1202), Tuple.Create("form", 1202), true)
|
|
|
|
#line 25 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 1206), Tuple.Create<System.Object, System.Int32>(hideAdvanced ? " Config_HideAdvanced" : null
|
|
|
|
#line default
|
|
#line hidden
|
|
, 1206), false)
|
|
);
|
|
|
|
WriteLiteral(" style=\"width: 640px\"");
|
|
|
|
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" style=\"width: 170px;\"");
|
|
|
|
WriteLiteral(">\r\n Id:\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 32 "..\..\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>\r\n " +
|
|
" Name:\r\n </th>\r\n <td>\r\n");
|
|
|
|
|
|
#line 40 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 40 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 42 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.TextBoxFor(model => model.DeviceProfile.Name));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 42 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 43 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 43 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 44 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 44 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(">\r\n $(function () {\r\n document." +
|
|
"DiscoFunctions.PropertyChangeHelper(\r\n $(\'#Device" +
|
|
"Profile_Name\'),\r\n \'Name\',\r\n " +
|
|
" \'");
|
|
|
|
|
|
#line 50 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceProfile.UpdateName(Model.DeviceProfile.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'ProfileName\'\r\n );" +
|
|
"\r\n });\r\n </script>\r\n");
|
|
|
|
|
|
#line 55 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 58 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.Name);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 58 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
|
|
" Short Name:\r\n </th>\r\n <td>\r\n");
|
|
|
|
|
|
#line 67 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 67 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 69 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.TextBoxFor(model => model.DeviceProfile.ShortName));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 69 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 70 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 70 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 71 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 71 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceProfile_ShortName'),
|
|
'Short Name',
|
|
'");
|
|
|
|
|
|
#line 77 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceProfile.UpdateShortName(Model.DeviceProfile.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'ShortName\'\r\n );\r\n" +
|
|
" });\r\n </script>\r\n");
|
|
|
|
|
|
#line 82 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 85 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.ShortName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 85 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
|
|
" Description:\r\n </th>\r\n <td>\r\n");
|
|
|
|
|
|
#line 94 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 94 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 96 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceProfile.Description));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 96 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 97 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 97 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 98 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 98 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceProfile_Description'),
|
|
'Description',
|
|
'");
|
|
|
|
|
|
#line 104 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceProfile.UpdateDescription(Model.DeviceProfile.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'Description\'\r\n );" +
|
|
"\r\n });\r\n </script>\r\n");
|
|
|
|
|
|
#line 109 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 112 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.Description);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 112 "..\..\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 119 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceCount.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</strong> ");
|
|
|
|
|
|
#line 119 "..\..\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 120 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 120 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (Model.DeviceDecommissionedCount > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 122 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceDecommissionedCount.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 122 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceDecommissionedCount == 1 ? "device is" : "devices are");
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" decommissioned.</div>\r\n");
|
|
|
|
|
|
#line 123 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
|
|
" Distribution Type:\r\n </th>\r\n <td>\r\n");
|
|
|
|
|
|
#line 131 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 131 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 133 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.DropDownList("DeviceProfile_DistributionType", Model.DeviceProfileDistributionTypes));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 133 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 134 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 134 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceProfile_DistributionType'),
|
|
null,
|
|
'");
|
|
|
|
|
|
#line 140 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceProfile.UpdateDistributionType(Model.DeviceProfile.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'DistributionType\'\r\n " +
|
|
" );\r\n });\r\n </script>\r\n");
|
|
|
|
|
|
#line 145 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 148 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.DistributionType.ToString());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 148 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"info-box\"");
|
|
|
|
WriteLiteral(">\r\n <p");
|
|
|
|
WriteLiteral(" class=\"fa-p\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-info-circle\"");
|
|
|
|
WriteLiteral(@"></i>One-to-many devices are typically shared.
|
|
One-to-one devices are typically assigned to a user;
|
|
enrolment with a one-to-one device isn't considered complete until it is assigned.
|
|
</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
Address:
|
|
</th>
|
|
<td>
|
|
");
|
|
|
|
|
|
#line 164 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 164 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 166 "..\..\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 166 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 167 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 167 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceProfile_DefaultOrganisationAddress'),
|
|
null,
|
|
'");
|
|
|
|
|
|
#line 173 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceProfile.UpdateDefaultOrganisationAddress(Model.DeviceProfile.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'DefaultOrganisationAddress\'\r\n " +
|
|
" );\r\n });\r\n </script>\r\n");
|
|
|
|
|
|
#line 178 "..\..\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 184 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 187 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DefaultOrganisationAddress.ToString());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 187 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"info-box\"");
|
|
|
|
WriteLiteral(">\r\n <p");
|
|
|
|
WriteLiteral(" class=\"fa-p\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-info-circle\"");
|
|
|
|
WriteLiteral("></i>The profile address is used to separate jobs for <a");
|
|
|
|
WriteAttribute("href", Tuple.Create(" href=\"", 8096), Tuple.Create("\"", 8147)
|
|
|
|
#line 192 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 8103), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.Organisation.Index())
|
|
|
|
#line default
|
|
#line hidden
|
|
, 8103), false)
|
|
);
|
|
|
|
WriteLiteral(@">multi-site mode</a>.
|
|
It is also suggested as the default address for warranty/repair actions.
|
|
</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Policies</th>
|
|
<td>
|
|
<div>
|
|
");
|
|
|
|
|
|
#line 202 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 202 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_ProvisionADAccount\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 204 "..\..\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 () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceProfile_ProvisionADAccount'),
|
|
null,
|
|
'");
|
|
|
|
|
|
#line 210 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceProfile.UpdateProvisionADAccount(Model.DeviceProfile.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'ProvisionADAccount\'\r\n " +
|
|
" );\r\n });\r\n </scri" +
|
|
"pt>\r\n");
|
|
|
|
|
|
#line 215 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_ProvisionADAccount\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 218 "..\..\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 219 "..\..\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 223 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <div");
|
|
|
|
WriteLiteral(" class=\"info-box\"");
|
|
|
|
WriteLiteral(">\r\n <p");
|
|
|
|
WriteLiteral(" class=\"fa-p\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-info-circle\"");
|
|
|
|
WriteLiteral(@"></i>When enabled an Active Directory account will be provisioned for the device when enrolment occurs
|
|
and the device will be joined to the domain (refer to the <code>Computer Name Template Expression</code> and the
|
|
<code>Organisational Unit</code> configuration options below).
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div");
|
|
|
|
WriteLiteral(" style=\"margin-top: 8px;\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 233 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 233 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_AssignedUserLocalAdmin\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 235 "..\..\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 () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceProfile_AssignedUserLocalAdmin'),
|
|
null,
|
|
'");
|
|
|
|
|
|
#line 241 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceProfile.UpdateAssignedUserLocalAdmin(Model.DeviceProfile.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'AssignedUserLocalAdmin\'\r\n " +
|
|
" );\r\n });\r\n </" +
|
|
"script>\r\n");
|
|
|
|
|
|
#line 246 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_AssignedUserLocalAdmin\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 249 "..\..\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 250 "..\..\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 254 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <div");
|
|
|
|
WriteLiteral(" class=\"info-box\"");
|
|
|
|
WriteLiteral(">\r\n <p");
|
|
|
|
WriteLiteral(" class=\"fa-p\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-info-circle\"");
|
|
|
|
WriteLiteral("></i>When enabled the user assigned to the device will be added to the <code>Loca" +
|
|
"l Administrators</code> group during device enrolment.\r\n " +
|
|
" </p>\r\n </div>\r\n </div>\r\n <" +
|
|
"div");
|
|
|
|
WriteLiteral(" style=\"margin-top: 8px;\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 262 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 262 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_AllowUntrustedReimageJobEnrolment\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 264 "..\..\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 () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceProfile_AllowUntrustedReimageJobEnrolment'),
|
|
null,
|
|
'");
|
|
|
|
|
|
#line 270 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceProfile.UpdateAllowUntrustedReimageJobEnrolment(Model.DeviceProfile.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'AllowUntrustedReimageJobEnrolment\'\r\n " +
|
|
" );\r\n });\r\n " +
|
|
" </script>\r\n");
|
|
|
|
|
|
#line 275 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_AllowUntrustedReimageJobEnrolment\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 278 "..\..\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 279 "..\..\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 283 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <div");
|
|
|
|
WriteLiteral(" class=\"info-box\"");
|
|
|
|
WriteLiteral(">\r\n <p");
|
|
|
|
WriteLiteral(" class=\"fa-p\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-info-circle\"");
|
|
|
|
WriteLiteral(@"></i>When enabled an untrusted device enrolment will be allowed if a <code>Software - Reimage</code> job is open for the device.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
Computer Name<br />
|
|
Template Expression:
|
|
</th>
|
|
<td>
|
|
<div");
|
|
|
|
WriteLiteral(" id=\"displayComputerNameTemplate\"");
|
|
|
|
WriteLiteral(" class=\"code\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 299 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 299 "..\..\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 302 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 305 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.ComputerNameTemplate);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 305 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n");
|
|
|
|
|
|
#line 308 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 308 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig && canConfigExpression)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <a");
|
|
|
|
WriteLiteral(" id=\"changeComputerNameTemplate\"");
|
|
|
|
WriteLiteral(" href=\"#\"");
|
|
|
|
WriteLiteral(" class=\"button small\"");
|
|
|
|
WriteLiteral(">Change</a>");
|
|
|
|
|
|
#line 310 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 310 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 310 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"dialogComputerNameTemplate\"");
|
|
|
|
WriteLiteral(" title=\"Computer Name Template\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 312 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 312 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
using (Html.BeginForm(MVC.API.DeviceProfile.UpdateComputerNameTemplate(Model.DeviceProfile.Id, null, false)))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 314 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.AntiForgeryToken());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 314 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 315 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.TextArea("ComputerNameTemplate", Model.DeviceProfile.ComputerNameTemplate, new { spellcheck = "false", required = "required" }));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 315 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"hidden info-box error code whitespace-pre-wrap\"");
|
|
|
|
WriteLiteral(">\r\n </div>\r\n <div");
|
|
|
|
WriteLiteral(" class=\"test hidden\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 320 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 320 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
using (Html.BeginForm(MVC.API.DeviceProfile.TestComputerNameTemplate(Model.DeviceProfile.Id)))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 322 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.AntiForgeryToken());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 322 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
;
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <table");
|
|
|
|
WriteLiteral(" class=\"genericData\"");
|
|
|
|
WriteLiteral(@">
|
|
<thead>
|
|
<tr>
|
|
<th>Serial Number</th>
|
|
<th>Current</th>
|
|
<th>Result</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<input");
|
|
|
|
WriteLiteral(" id=\"ComputerNameTemplateTestSearch\"");
|
|
|
|
WriteLiteral(" name=\"UserSpecifiedDeviceSerialNumber\"");
|
|
|
|
WriteLiteral(" type=\"text\"");
|
|
|
|
WriteLiteral(" placeholder=\"Device Serial Number\"");
|
|
|
|
WriteLiteral(" spellcheck=\"false\"");
|
|
|
|
WriteLiteral(@" />
|
|
</td>
|
|
<td> </td>
|
|
<td> </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
");
|
|
|
|
|
|
#line 341 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n <button");
|
|
|
|
WriteLiteral(" id=\"ComputerNameTemplateTest\"");
|
|
|
|
WriteLiteral(" class=\"button small\"");
|
|
|
|
WriteLiteral(" type=\"button\"");
|
|
|
|
WriteLiteral(">Test Template</button>");
|
|
|
|
|
|
#line 343 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(() => {
|
|
let $dialog = null;
|
|
let $textarea = null;
|
|
let currentValue = null;
|
|
|
|
$('#changeComputerNameTemplate').click(e => {
|
|
e.preventDefault();
|
|
|
|
if (!$dialog) {
|
|
$textarea = $('#ComputerNameTemplate');
|
|
currentValue = $textarea.val();
|
|
$dialog = $('#dialogComputerNameTemplate').dialog({
|
|
autoOpen: false,
|
|
buttons: null,
|
|
draggable: false,
|
|
modal: true,
|
|
resizable: false,
|
|
width: 700,
|
|
buttons: {
|
|
""Cancel"": () => {
|
|
$textarea.val(currentValue);
|
|
$dialog.find('.error').addClass('hidden');
|
|
$dialog.dialog(""close"");
|
|
},
|
|
""Expression Browser"": () => {
|
|
window.open('");
|
|
|
|
|
|
#line 371 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.Config.Expressions.Browser()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\', \'_blank\');\r\n },\r\n " +
|
|
" \"Save\": () => {\r\n " +
|
|
" const $form = $textarea.closest(\'form\');\r\n " +
|
|
" $(this).find(\'.error\').addClass(\'hidden\');\r\n\r\n " +
|
|
" if ($form[0].reportValidity()) {\r\n " +
|
|
" const body = new FormData($form[0]);\r\n " +
|
|
" const url = $form.attr(\'actio" +
|
|
"n\');\r\n\r\n const $ajaxLoading =" +
|
|
" $(\'#changeComputerNameTemplate\').nextAll(\'.ajaxLoading\').first();\r\n " +
|
|
" $ajaxLoading.show();\r\n " +
|
|
" $dialog.dialog(\'close\');\r\n\r\n " +
|
|
" fetch(url, {\r\n " +
|
|
" method: \'POST\',\r\n " +
|
|
" body: body\r\n " +
|
|
" }).then(response => {\r\n " +
|
|
"if (response.ok) {\r\n " +
|
|
"currentValue = $textarea.val();\r\n " +
|
|
" const $display = $(\'#displayComputerNameTemplate\');\r\n " +
|
|
" if (currentValue) {\r\n " +
|
|
" $display.text(currentValue);\r" +
|
|
"\n } else {\r\n " +
|
|
" $display.html(\'<span clas" +
|
|
"s=\"smallMessage\"><None Specified></span>\');\r\n " +
|
|
" }\r\n " +
|
|
" $ajaxLoading.hide().next(\'.ajaxOk\').show().delay(\'fast\').fadeOut(\'" +
|
|
"slow\');\r\n } else if (resp" +
|
|
"onse.status == 400) {\r\n " +
|
|
" response.json().then(data => {\r\n " +
|
|
" $ajaxLoading.hide();\r\n " +
|
|
" $dialog.dialog(\'open\');\r\n " +
|
|
" $dialog.find(\'.error\').text(data).removeClass(" +
|
|
"\'hidden\');\r\n cons" +
|
|
"ole.error(data);\r\n })" +
|
|
"\r\n }\r\n " +
|
|
" }).catch(error => {\r\n " +
|
|
" alert(\'Unable to save computer name template\');\r\n " +
|
|
" $ajaxLoading.hide();\r\n " +
|
|
" $dialog.dialog(\'open\');\r\n " +
|
|
" $dialog.find(\'.error\').tex" +
|
|
"t(\'Unable to save computer name template: \' + error).removeClass(\'hidden\');\r\n " +
|
|
" console.error(error);\r\n " +
|
|
" });\r\n " +
|
|
" }\r\n }\r\n " +
|
|
" }\r\n });\r\n " +
|
|
" const $buttonTest = $dialog.find(\'#ComputerNameTe" +
|
|
"mplateTest\');\r\n $buttonTest.click(e => {\r\n " +
|
|
" e.preventDefault();\r\n " +
|
|
" const $test = $dialog.find(\'.test\');\r\n\r\n " +
|
|
" const $ajaxLoading = $(e.currentTarget).nextAll(\'.ajaxLoading\'" +
|
|
").first();\r\n $ajaxLoading.show();\r\n\r\n " +
|
|
" const $form = $test.find(\'form\');\r\n " +
|
|
" const url = $form.attr(\'action\');\r\n " +
|
|
" const body = new FormData($form[0]);\r\n " +
|
|
" body.append(\'ComputerNameTemplate\', $textarea.val());\r\n\r" +
|
|
"\n fetch(url, {\r\n " +
|
|
" method: \'POST\',\r\n " +
|
|
"body: body\r\n }).then(response => {\r\n " +
|
|
" if (response.ok) {\r\n " +
|
|
" response.json().then(data => {\r\n " +
|
|
" const $table = $test.find(\'table tbody\');\r\n " +
|
|
" if (data.UserSpecifiedResult) {\r\n " +
|
|
" const result = data.UserS" +
|
|
"pecifiedResult;\r\n const r" +
|
|
"ow = $table.find(\'tr\').first();\r\n " +
|
|
" row.find(\'input\').val(result.DeviceSerialNumber);\r\n " +
|
|
" const columns = row.find(\'td\');\r\n " +
|
|
" columns.eq(1).html(\'\');\r\n " +
|
|
" $(\'<span class=\"code\">\').text(resu" +
|
|
"lt.DeviceComputerName)\r\n " +
|
|
" .appendTo(columns.eq(1))\r\n " +
|
|
" columns.eq(2).html(\'\');\r\n " +
|
|
" $(\'<span class=\"code\">\').text(result.RenderedComputerName)\r\n " +
|
|
" .appendTo(columns.eq(2))\r\n " +
|
|
" if (!result.Success) {\r\n " +
|
|
" $(\'<div class=\"info-box err" +
|
|
"or code whitespace-pre-wrap\">\').text(result.ErrorMessage).appendTo(columns[2]);\r" +
|
|
"\n }\r\n " +
|
|
" }\r\n " +
|
|
" if (data.RandomDeviceResults) {\r\n " +
|
|
" $table.find(\'tr\').slice(1).remove();\r\n " +
|
|
" for (var i = 0; i < data.RandomDeviceResults.lengt" +
|
|
"h; i++) {\r\n const res" +
|
|
"ult = data.RandomDeviceResults[i];\r\n " +
|
|
" const row = $(\'<tr><td></td><td></td><td></td></tr>\');\r\n " +
|
|
" const columns = row.find(\'td" +
|
|
"\');\r\n $(\'<a>\').attr({" +
|
|
"\r\n href: result.U" +
|
|
"rl,\r\n target: \'_b" +
|
|
"lank\'\r\n }).text(resul" +
|
|
"t.DeviceSerialNumber)\r\n " +
|
|
" .appendTo(columns.eq(0));\r\n " +
|
|
" $(\'<span class=\"code\">\').text(result.DeviceComputerName)\r\n " +
|
|
" .appendTo(columns.eq(1))" +
|
|
"\r\n $(\'<span class=\"co" +
|
|
"de\">\').text(result.RenderedComputerName)\r\n " +
|
|
" .appendTo(columns.eq(2))\r\n " +
|
|
" if (!result.Success) {\r\n " +
|
|
" $(\'<div class=\"info-box error code white" +
|
|
"space-pre-wrap\">\').text(result.ErrorMessage).appendTo(columns.eq(2));\r\n " +
|
|
" }\r\n " +
|
|
" row.appendTo($table);\r\n " +
|
|
" }\r\n " +
|
|
" }\r\n $test.removeClass" +
|
|
"(\'hidden\');\r\n $ajaxLoading.hi" +
|
|
"de().next(\'.ajaxOk\').show().delay(\'fast\').fadeOut(\'slow\');\r\n " +
|
|
" });\r\n } e" +
|
|
"lse if (response.status == 400) {\r\n " +
|
|
" response.json().then(data => {\r\n " +
|
|
" $ajaxLoading.hide();\r\n " +
|
|
" $test.addClass(\'hidden\');\r\n " +
|
|
"$dialog.find(\'.error\').text(data).removeClass(\'hidden\');\r\n " +
|
|
" console.error(data);\r\n " +
|
|
" })\r\n }\r\n " +
|
|
" }).catch(error => {\r\n " +
|
|
" $ajaxLoading.hide();\r\n " +
|
|
" $test.addClass(\'hidden\');\r\n $dialog" +
|
|
".find(\'.error\').text(\'Unable to test computer name template: \' + error).removeCl" +
|
|
"ass(\'hidden\');\r\n console.error(error)" +
|
|
";\r\n });\r\n\r\n " +
|
|
" return false;\r\n })\r\n " +
|
|
" const $testSearchText = $dialog.find(\'#ComputerNameTemplate" +
|
|
"TestSearch\');\r\n $testSearchText.autocomplete(" +
|
|
"{\r\n source: \'");
|
|
|
|
|
|
#line 495 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.Search.Devices()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"',
|
|
minLength: 2,
|
|
focus: function (e, ui) {
|
|
$testSearchText.val(ui.item.Id);
|
|
return false;
|
|
},
|
|
select: function (e, ui) {
|
|
$testSearchText.val(ui.item.Id).blur();
|
|
$buttonTest.click();
|
|
return false;
|
|
}
|
|
}).data('ui-autocomplete')._renderItem = function (ul, item) {
|
|
return $('<li>')
|
|
.data('item.autocomplete', item)
|
|
.append($('<a>').text(item.Description))
|
|
.appendTo(ul);
|
|
};
|
|
}
|
|
$dialog.dialog('open');
|
|
|
|
return false;
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 519 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" style=\"margin-top: 8px;\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 521 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 521 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_EnforceComputerNameConvention\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 523 "..\..\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 () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceProfile_EnforceComputerNameConvention'),
|
|
null,
|
|
'");
|
|
|
|
|
|
#line 529 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceProfile.UpdateEnforceComputerNameConvention(Model.DeviceProfile.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'EnforceComputerNameConvention\'\r\n " +
|
|
" );\r\n });\r\n " +
|
|
" </script>\r\n");
|
|
|
|
|
|
#line 534 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_EnforceComputerNameConvention\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 537 "..\..\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 538 "..\..\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 542 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n <div");
|
|
|
|
WriteLiteral(" class=\"info-box\"");
|
|
|
|
WriteLiteral(">\r\n <p");
|
|
|
|
WriteLiteral(" class=\"fa-p\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-info-circle\"");
|
|
|
|
WriteLiteral(@"></i>Computer names are only changed when Active Directory accounts are provisioned.
|
|
If the device has already joined the domain when enrolment occurs the name will remain the same unless Enforce Naming Convention is enabled.
|
|
</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
Organisational Unit:
|
|
</th>
|
|
<td>
|
|
");
|
|
|
|
|
|
#line 557 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 557 "..\..\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 559 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.DeviceProfile.OrganisationalUnit);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(">\r\n <span>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 561 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.FriendlyOrganisationalUnitName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </span>\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" <button");
|
|
|
|
WriteLiteral(" id=\"changeOrganisationalUnit\"");
|
|
|
|
WriteLiteral(" type=\"button\"");
|
|
|
|
WriteLiteral(" class=\"button small\"");
|
|
|
|
WriteLiteral(">Change</button>");
|
|
|
|
|
|
#line 564 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 564 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 564 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"dialogOrganisationalUnit\"");
|
|
|
|
WriteLiteral(" title=\"Organisational Unit\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteLiteral(" data-url=\"");
|
|
|
|
|
|
#line 565 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.System.DomainOrganisationalUnits()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(">\r\n <div");
|
|
|
|
WriteLiteral(" id=\"dialogOrganisationalUnit_Loading\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 567 "..\..\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\"");
|
|
|
|
WriteLiteral(">\r\n </div>\r\n");
|
|
|
|
|
|
#line 571 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 571 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
using (Html.BeginForm(MVC.API.DeviceProfile.UpdateOrganisationalUnit(Model.DeviceProfile.Id, redirect: true)))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 573 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.AntiForgeryToken());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 573 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
;
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" type=\"hidden\"");
|
|
|
|
WriteLiteral(" name=\"OrganisationalUnit\"");
|
|
|
|
WriteLiteral(" />\r\n");
|
|
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"enforceOrganisationalUnit\"");
|
|
|
|
WriteLiteral(">\r\n <input");
|
|
|
|
WriteLiteral(" id=\"enforceOrganisationalUnit\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" name=\"enforce\"");
|
|
|
|
WriteLiteral(" value=\"true\"");
|
|
|
|
WriteLiteral(" /> <label");
|
|
|
|
WriteLiteral(" for=\"enforceOrganisationalUnit\"");
|
|
|
|
WriteLiteral(">Move all profile devices to this organisational unit</label>\r\n " +
|
|
" </div>\r\n");
|
|
|
|
|
|
#line 578 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n");
|
|
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(">\r\n $(function () {\r\n var ouVal" +
|
|
"ue = $(\'#DeviceProfile_OrganisationalUnit\').attr(\'data-value\');\r\n " +
|
|
" let $ouTree = null;\r\n let ouTree = null;" +
|
|
"\r\n let $dialog = null;\r\n v" +
|
|
"ar $enforceCheckbox;\r\n var ouSet = function (ou) {\r\n " +
|
|
" const $form = $dialog.find(\'form\');\r\n " +
|
|
" $form.find(\'input[name=\"OrganisationalUnit\"]\').val(ou);\r\n " +
|
|
" $form.submit();\r\n }\r\n " +
|
|
" var expandNodeTree = function (node) {\r\n " +
|
|
" var parent = node.parent;\r\n if (" +
|
|
"parent) {\r\n expandNodeTree(parent);\r\n " +
|
|
" parent.setExpanded(true, { noAnimation: true, noEven" +
|
|
"ts: false });\r\n }\r\n }\r" +
|
|
"\n var expandAndFocusNode = function (nodeKey) {\r\n " +
|
|
" if (ouTree) {\r\n v" +
|
|
"ar ouNode = ouTree.getNodeByKey(ouValue);\r\n i" +
|
|
"f (ouNode) {\r\n expandNodeTree(ouNode);\r\n " +
|
|
" ouNode.setFocus(true);\r\n " +
|
|
" ouNode.setActive(true);\r\n\r\n " +
|
|
" var li = ouNode.li;\r\n var liOff" +
|
|
"set = li.offsetParent;\r\n if (liOffset && " +
|
|
"li.offsetTop + li.offsetHeight > liOffset.offsetHeight) {\r\n " +
|
|
" $(liOffset).animate({ \'scrollTop\': li.offsetTop - liOffse" +
|
|
"t.offsetHeight + li.offsetHeight + 4 }, \'fast\');\r\n " +
|
|
" }\r\n }\r\n " +
|
|
" }\r\n }\r\n var ouChange =" +
|
|
" async function () {\r\n if (!$dialog) {\r\n " +
|
|
" $dialog = $(\'#dialogOrganisationalUnit\').dialog({\r\n " +
|
|
" autoOpen: false,\r\n " +
|
|
" buttons: null,\r\n draggabl" +
|
|
"e: false,\r\n modal: true,\r\n " +
|
|
" resizable: false,\r\n " +
|
|
" width: 500,\r\n height: 500\r\n " +
|
|
" });\r\n $loading = $(" +
|
|
"\'#dialogOrganisationalUnit_Loading\');\r\n $load" +
|
|
"ing.find(\'i.ajaxLoading\').show();\r\n\r\n $ouTree" +
|
|
" = $(\'#treeOrganisationalUnit\');\r\n $dialog.cs" +
|
|
"s(\'overflow\', \'visible\');\r\n\r\n $enforceCheckbo" +
|
|
"x = $(\'#enforceOrganisationalUnit\');\r\n\r\n cons" +
|
|
"t body = new FormData();\r\n body.append(\'__Req" +
|
|
"uestVerificationToken\', document.body.dataset.antiforgery);\r\n " +
|
|
" const response = await fetch($dialog.attr(\'data-url\'), {\r\n " +
|
|
" method: \'POST\',\r\n " +
|
|
" body: body\r\n });\r\n " +
|
|
" const data = await response.json();\r\n " +
|
|
" $loading.hide();\r\n\r\n // Make \'D" +
|
|
"omains\' unselectable\r\n $.each(data, function " +
|
|
"(i, node) {\r\n node.unselectable = true;\r\n" +
|
|
" });\r\n\r\n o" +
|
|
"uTree = $ouTree.fancytree({\r\n source: dat" +
|
|
"a,\r\n checkbox: false,\r\n " +
|
|
" selectMode: 1,\r\n ke" +
|
|
"yboard: 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(\'" +
|
|
"option\', \'buttons\', {\r\n \'Use Default Comp" +
|
|
"uters Container\': function () {\r\n var" +
|
|
" $this = $(this);\r\n $this.css(\'overfl" +
|
|
"ow\', \'hidden\');\r\n $this.dialog(\"disab" +
|
|
"le\");\r\n $this.dialog(\"option\", \"butto" +
|
|
"ns\", null);\r\n ouSet(\'\');\r\n " +
|
|
" },\r\n \'Save\':" +
|
|
" function () {\r\n var node = ouTree.ge" +
|
|
"tActiveNode();\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 Uni" +
|
|
"t to Save\')\r\n }\r\n " +
|
|
" }\r\n });\r\n\r\n " +
|
|
" // Expand\r\n expandAndFo" +
|
|
"cusNode(ouValue);\r\n\r\n ouTree.options.fx = { h" +
|
|
"eight: \"toggle\", duration: 200 };\r\n }\r\n " +
|
|
" $dialog.dialog(\'open\');\r\n\r\n " +
|
|
" $enforceCheckbox.prop(\'checked\', $(\'#DeviceProfile_EnforceOrganisationalUnit\')." +
|
|
"prop(\'checked\'));\r\n };\r\n\r\n " +
|
|
" $(\'#changeOrganisationalUnit\').click(ouChange);\r\n });\r\n " +
|
|
" </script>\r\n");
|
|
|
|
|
|
#line 694 "..\..\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 699 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Model.FriendlyOrganisationalUnitName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </span>\r\n </div>\r\n");
|
|
|
|
|
|
#line 702 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 703 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (!Model.OrganisationalUnitExists)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"info-box error\"");
|
|
|
|
WriteLiteral(">\r\n <p");
|
|
|
|
WriteLiteral(" class=\"fa-p\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-exclamation-triangle\"");
|
|
|
|
WriteLiteral("></i>The Organisational Unit could not be found.\r\n </p>\r\n " +
|
|
" </div>\r\n");
|
|
|
|
|
|
#line 710 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" style=\"margin-top: 8px;\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 712 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 712 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_EnforceOrganisationalUnit\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 714 "..\..\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 () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceProfile_EnforceOrganisationalUnit'),
|
|
null,
|
|
'");
|
|
|
|
|
|
#line 720 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceProfile.UpdateEnforceOrganisationalUnit(Model.DeviceProfile.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'EnforceOrganisationalUnit\'\r\n " +
|
|
" );\r\n });\r\n " +
|
|
" </script>\r\n");
|
|
|
|
|
|
#line 725 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_EnforceOrganisationalUnit\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 728 "..\..\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 729 "..\..\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 733 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n <div");
|
|
|
|
WriteLiteral(" class=\"info-box\"");
|
|
|
|
WriteLiteral(">\r\n <p");
|
|
|
|
WriteLiteral(" class=\"fa-p\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-info-circle\"");
|
|
|
|
WriteLiteral(@"></i>When an Active Directory account is provisioned it will be placed in this container. This typically occurs
|
|
at device enrolment. If the device has already joined the domain and the <code>Enforce Organisational Unit</code> option is enabled
|
|
the Active Directory account will be moved into this organisational unit during enrolment.
|
|
</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
Provision Certificates:
|
|
");
|
|
|
|
|
|
#line 747 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 747 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig && (Model.CertificateProviders.Count > 0 || Model.CertificateAuthorityProviders.Count > 0))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <br />\r\n");
|
|
|
|
|
|
#line 750 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 750 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader("DeviceProfile_CertificateProviders"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 750 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 752 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig && Model.CertificateProviders.Count > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
const $container = $('#DeviceProfile_CertificateProviders');
|
|
|
|
$container.on('change', 'input', function () {
|
|
const $ajaxLoading = $('#DeviceProfile_CertificateProviders_loading').show();
|
|
|
|
const body = new FormData();
|
|
body.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
|
body.append('certificateProviders', $container.find('input:checked',).map(function () { return $(this).val() }).get().join(','));
|
|
|
|
fetch('");
|
|
|
|
|
|
#line 765 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceProfile.UpdateCertificateProviders(Model.DeviceProfile.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"', {
|
|
method: 'POST',
|
|
body: body
|
|
}).then(r => {
|
|
if (r.ok) {
|
|
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
} else {
|
|
alert('Unable to change property ""CertificateProviders"":\n' + r.statusText);
|
|
$ajaxLoading.hide();
|
|
}
|
|
}).catch(e => {
|
|
alert('Unable to change property ""CertificateProviders"":\n' + e);
|
|
$ajaxLoading.hide();
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 782 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 783 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig && Model.CertificateProviders.Count > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
var $container = $('#DeviceProfile_CertificateAuthorityProviders');
|
|
|
|
$container.on('change', 'input', function () {
|
|
var $ajaxLoading = $('#DeviceProfile_CertificateProviders_loading').show();
|
|
|
|
const body = new FormData();
|
|
body.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
|
body.append('certificateAuthorityProviders', $container.find('input:checked',).map(function () { return $(this).val() }).get().join(','));
|
|
|
|
fetch('");
|
|
|
|
|
|
#line 796 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceProfile.UpdateCertificateAuthorityProviders(Model.DeviceProfile.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"', {
|
|
method: 'POST',
|
|
body: body
|
|
}).then(r => {
|
|
if (r.ok) {
|
|
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
} else {
|
|
alert('Unable to change property ""CertificateAuthorityProviders"":\n' + r.statusText);
|
|
$ajaxLoading.hide();
|
|
}
|
|
}).catch(e => {
|
|
alert('Unable to change property ""CertificateAuthorityProviders"":\n' + e);
|
|
$ajaxLoading.hide();
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 813 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </th>\r\n <td>\r\n <h4>Device/Machine Certifica" +
|
|
"tes</h4>\r\n");
|
|
|
|
|
|
#line 817 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 817 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig && Model.CertificateProviders.Count > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 819 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(CommonHelpers.CheckBoxList("DeviceProfile_CertificateProviders", "DeviceProfile_CertificateProviders", Model.CertificateProviders.ToSelectListItems(Model.DeviceProfile.GetCertificateProviders())));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 819 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
else
|
|
{
|
|
var certificateProviders = Model.DeviceProfile.GetCertificateProviders().ToList();
|
|
|
|
if (certificateProviders.Count == 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Allocated></span>\r\n");
|
|
|
|
|
|
#line 828 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <ul>\r\n");
|
|
|
|
|
|
#line 832 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 832 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
foreach (var certificateProvider in certificateProviders)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li>");
|
|
|
|
|
|
#line 834 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(certificateProvider.Name);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</li>\r\n");
|
|
|
|
|
|
#line 835 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </ul>\r\n");
|
|
|
|
|
|
#line 837 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <h4");
|
|
|
|
WriteLiteral(" style=\"margin-top: 4px;\"");
|
|
|
|
WriteLiteral(">Authority Certificates</h4>\r\n");
|
|
|
|
|
|
#line 840 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 840 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig && Model.CertificateAuthorityProviders.Count > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 842 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(CommonHelpers.CheckBoxList("DeviceProfile_CertificateAuthorityProviders", "DeviceProfile_CertificateAuthorityProviders", Model.CertificateAuthorityProviders.ToSelectListItems(Model.DeviceProfile.GetCertificateAuthorityProviders())));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 842 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
else
|
|
{
|
|
var certificateProviders = Model.DeviceProfile.GetCertificateAuthorityProviders().ToList();
|
|
|
|
if (certificateProviders.Count == 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Allocated></span>\r\n");
|
|
|
|
|
|
#line 851 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <ul>\r\n");
|
|
|
|
|
|
#line 855 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 855 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
foreach (var certificateProvider in certificateProviders)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li>");
|
|
|
|
|
|
#line 857 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(certificateProvider.Name);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</li>\r\n");
|
|
|
|
|
|
#line 858 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </ul>\r\n");
|
|
|
|
|
|
#line 860 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 862 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canViewPlugins)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"info-box\"");
|
|
|
|
WriteLiteral(">\r\n <p");
|
|
|
|
WriteLiteral(" class=\"fa-p\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-info-circle\"");
|
|
|
|
WriteLiteral("></i>View the <a");
|
|
|
|
WriteAttribute("href", Tuple.Create(" href=\"", 49694), Tuple.Create("\"", 49744)
|
|
|
|
#line 866 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 49701), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.Plugins.Install())
|
|
|
|
#line default
|
|
#line hidden
|
|
, 49701), false)
|
|
);
|
|
|
|
WriteLiteral(">Plugin Catalogue</a> to discover and install certificate provider plugins.\r\n " +
|
|
" </p>\r\n </div>\r\n");
|
|
|
|
|
|
#line 869 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
|
|
" Provision Wireless Profiles:\r\n");
|
|
|
|
|
|
#line 875 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 875 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig && Model.WirelessProfileProviders.Count > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <br />\r\n");
|
|
|
|
|
|
#line 878 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 878 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader("DeviceProfile_WirelessProfileProviders"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 878 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
var $container = $('#DeviceProfile_WirelessProfileProviders');
|
|
|
|
$container.on('change', 'input', function () {
|
|
var $ajaxLoading = $('#DeviceProfile_WirelessProfileProviders_loading').show();
|
|
|
|
const body = new FormData();
|
|
body.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
|
body.append('wirelessProfileProviders', $container.find('input:checked',).map(function () { return $(this).val() }).get().join(','));
|
|
|
|
fetch('");
|
|
|
|
|
|
#line 890 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceProfile.UpdateWirelessProfileProviders(Model.DeviceProfile.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"', {
|
|
method: 'POST',
|
|
body: body
|
|
}).then(r => {
|
|
if (r.ok) {
|
|
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
} else {
|
|
alert('Unable to change property ""WirelessProfileProviders"":\n' + r.statusText);
|
|
$ajaxLoading.hide();
|
|
}
|
|
}).catch(e => {
|
|
alert('Unable to change property ""WirelessProfileProviders"":\n' + e);
|
|
$ajaxLoading.hide();
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 907 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </th>\r\n <td>\r\n");
|
|
|
|
|
|
#line 910 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 910 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig && Model.WirelessProfileProviders.Count > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 912 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(CommonHelpers.CheckBoxList("DeviceProfile_WirelessProfileProviders", "DeviceProfile_WirelessProfileProviders", Model.WirelessProfileProviders.ToSelectListItems(Model.DeviceProfile.GetWirelessProfileProviders())));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 912 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
else
|
|
{
|
|
var wirelessProfileProviders = Model.DeviceProfile.GetWirelessProfileProviders().ToList();
|
|
|
|
if (wirelessProfileProviders.Count == 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Allocated></span>\r\n");
|
|
|
|
|
|
#line 921 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <ul>\r\n");
|
|
|
|
|
|
#line 925 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 925 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
foreach (var wirelessProfileProvider in wirelessProfileProviders)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li>");
|
|
|
|
|
|
#line 927 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(wirelessProfileProvider.Name);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</li>\r\n");
|
|
|
|
|
|
#line 928 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </ul>\r\n");
|
|
|
|
|
|
#line 930 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 932 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canViewPlugins)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"info-box\"");
|
|
|
|
WriteLiteral(">\r\n <p");
|
|
|
|
WriteLiteral(" class=\"fa-p\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-info-circle\"");
|
|
|
|
WriteLiteral("></i>View the <a");
|
|
|
|
WriteAttribute("href", Tuple.Create(" href=\"", 53352), Tuple.Create("\"", 53402)
|
|
|
|
#line 936 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 53359), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.Plugins.Install())
|
|
|
|
#line default
|
|
#line hidden
|
|
, 53359), false)
|
|
);
|
|
|
|
WriteLiteral(">Plugin Catalogue</a> to discover and install wireless profile provider plugins.\r" +
|
|
"\n </p>\r\n </div>\r\n");
|
|
|
|
|
|
#line 939 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n");
|
|
|
|
|
|
#line 942 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 942 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (hideAdvanced)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <tr>\r\n <td");
|
|
|
|
WriteLiteral(" colspan=\"2\"");
|
|
|
|
WriteLiteral(" style=\"text-align: right;\"");
|
|
|
|
WriteLiteral(">\r\n <button");
|
|
|
|
WriteLiteral(" id=\"Config_HideAdvanced_Show\"");
|
|
|
|
WriteLiteral(" class=\"button small\"");
|
|
|
|
WriteLiteral(@">Show Advanced Options</button>
|
|
<script>
|
|
$(function () {
|
|
$('#Config_HideAdvanced_Show').click(function () {
|
|
var $this = $(this);
|
|
$this.closest('.Config_HideAdvanced').removeClass('Config_HideAdvanced');
|
|
$this.closest('tr').remove();
|
|
});
|
|
});
|
|
</script>
|
|
</td>
|
|
</tr>
|
|
");
|
|
|
|
|
|
#line 958 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <tr");
|
|
|
|
WriteLiteral(" class=\"Config_HideAdvanced_Item\"");
|
|
|
|
WriteLiteral(">\r\n <th>\r\n Linked Groups:\r\n </th>\r\n " +
|
|
" <td>\r\n <div>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 965 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
|
|
{
|
|
CanConfigure = canConfig,
|
|
CategoryDescription = DeviceProfileDevicesManagedGroup.GetCategoryDescription(Model.DeviceProfile),
|
|
Description = DeviceProfileDevicesManagedGroup.GetDescription(Model.DeviceProfile),
|
|
ManagedGroup = Model.DevicesLinkedGroup,
|
|
UpdateUrl = Url.Action(MVC.API.DeviceProfile.UpdateDevicesLinkedGroup(Model.DeviceProfile.Id, redirect: true))
|
|
}));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 973 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
|
|
{
|
|
CanConfigure = canConfig,
|
|
CategoryDescription = DeviceProfileAssignedUsersManagedGroup.GetCategoryDescription(Model.DeviceProfile),
|
|
Description = DeviceProfileAssignedUsersManagedGroup.GetDescription(Model.DeviceProfile),
|
|
ManagedGroup = Model.AssignedUsersLinkedGroup,
|
|
UpdateUrl = Url.Action(MVC.API.DeviceProfile.UpdateAssignedUsersLinkedGroup(Model.DeviceProfile.Id, redirect: true))
|
|
}));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 981 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 981 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 983 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupShared));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 983 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>\r\n");
|
|
|
|
|
|
#line 990 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.Partial(MVC.Config.Shared.Views._DeviceGroupDocumentBulkGenerate, Model));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n<div");
|
|
|
|
WriteLiteral(" class=\"actionBar\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 992 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 992 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (Model.CanDecommission)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <button");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_Decommission\"");
|
|
|
|
WriteLiteral(" class=\"button\"");
|
|
|
|
WriteLiteral(">Decommission All Devices</button>\r\n");
|
|
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"DeviceProfile_Decommission_Dialog\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteLiteral(" title=\"Profile Device Decommission\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 996 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 996 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
using (Html.BeginForm(MVC.API.Device.DeviceProfileDecommission(Model.DeviceProfile.Id)))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 998 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.AntiForgeryToken());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 998 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"clearfix\"");
|
|
|
|
WriteLiteral(" style=\"margin-bottom: 10px;\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-question-circle fa-lg information\"");
|
|
|
|
WriteLiteral("></i> Why are these devices to be decommissioned?\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" <div>\r\n <ul");
|
|
|
|
WriteLiteral(" class=\"none\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 1004 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 1004 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
foreach (DecommissionReasons decommissionReason in Enum.GetValues(typeof(DecommissionReasons)).Cast<DecommissionReasons>().OrderBy(r => r.ToString()))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li>\r\n <input");
|
|
|
|
WriteLiteral(" type=\"radio\"");
|
|
|
|
WriteAttribute("id", Tuple.Create(" id=\"", 57054), Tuple.Create("\"", 57126)
|
|
, Tuple.Create(Tuple.Create("", 57059), Tuple.Create("DeviceProfile_Decommission_Dialog_Reason_", 57059), true)
|
|
|
|
#line 1007 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 57100), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
|
|
|
#line default
|
|
#line hidden
|
|
, 57100), false)
|
|
);
|
|
|
|
WriteLiteral("\r\n name=\"decommissionReason\"");
|
|
|
|
WriteAttribute("value", Tuple.Create(" value=\"", 57193), Tuple.Create("\"", 57227)
|
|
|
|
#line 1008 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 57201), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
|
|
|
#line default
|
|
#line hidden
|
|
, 57201), false)
|
|
);
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 1008 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write((decommissionReason == DecommissionReasons.EndOfLife) ? "checked=\"checked\"" : string.Empty);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" />\r\n <label");
|
|
|
|
WriteAttribute("for", Tuple.Create(" for=\"", 57367), Tuple.Create("\"", 57440)
|
|
, Tuple.Create(Tuple.Create("", 57373), Tuple.Create("DeviceProfile_Decommission_Dialog_Reason_", 57373), true)
|
|
|
|
#line 1009 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 57414), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
|
|
|
#line default
|
|
#line hidden
|
|
, 57414), false)
|
|
);
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 1009 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(decommissionReason.ReasonMessage());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</label>\r\n </li>\r\n");
|
|
|
|
|
|
#line 1011 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </ul>\r\n <br />\r\n <label" +
|
|
">\r\n <input");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" value=\"true\"");
|
|
|
|
WriteLiteral(" name=\"unassignUsers\"");
|
|
|
|
WriteLiteral(" />\r\n Unassign devices users\r\n </label>" +
|
|
"\r\n </div>\r\n");
|
|
|
|
|
|
#line 1019 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n");
|
|
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
let buttonDialog = null;
|
|
$('#DeviceProfile_Decommission').click(function () {
|
|
if (!buttonDialog) {
|
|
buttonDialog = $('#DeviceProfile_Decommission_Dialog')
|
|
.dialog({
|
|
resizable: false,
|
|
modal: true,
|
|
autoOpen: false,
|
|
buttons: {
|
|
""Decommission"": function () {
|
|
const $this = $(this);
|
|
$this.find('form').trigger('submit');
|
|
$this.dialog(""disable"");
|
|
$this.dialog(""option"", ""buttons"", null);
|
|
},
|
|
Cancel: function () {
|
|
$(this).dialog(""close"");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
buttonDialog.dialog('open');
|
|
return false;
|
|
});
|
|
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 1050 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 1051 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (canDelete)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <button");
|
|
|
|
WriteLiteral(" id=\"buttonDelete\"");
|
|
|
|
WriteLiteral(" type=\"button\"");
|
|
|
|
WriteLiteral(" class=\"button\"");
|
|
|
|
WriteLiteral(">Delete</button>\r\n");
|
|
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"dialogConfirmDelete\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteLiteral(" title=\"Delete this Device Profile?\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 1055 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 1055 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
using (Html.BeginForm(MVC.API.DeviceProfile.Delete(Model.DeviceProfile.Id, true)))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 1057 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.AntiForgeryToken());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 1057 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <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 recove" +
|
|
"red. Are you sure?\r\n </p>\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
let dialog = null;
|
|
$('#buttonDelete').on('click', function () {
|
|
if (!dialog) {
|
|
dialog = $(""#dialogConfirmDelete"").dialog({
|
|
resizable: false,
|
|
width: 300,
|
|
modal: true,
|
|
autoOpen: false,
|
|
buttons: {
|
|
""Delete"": function () {
|
|
$(this)
|
|
.dialog(""option"", ""buttons"", null)
|
|
.find('form').trigger('submit');
|
|
},
|
|
Cancel: function () {
|
|
$(this).dialog(""close"");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
dialog.dialog('open');
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 1091 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 1092 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (Authorization.Has(Claims.Device.Actions.Export))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 1094 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.DeviceExportTypes.Profile, Model.DeviceProfile.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 1094 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 1096 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
if (Authorization.Has(Claims.Device.Search) && Model.DeviceCount > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 1098 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
Write(Html.ActionLinkButton(string.Format("View {0} Device{1}", Model.DeviceCount, (Model.DeviceCount != 1 ? "s" : null)), MVC.Search.Query(Model.DeviceProfile.Id.ToString(), "DeviceProfile")));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 1098 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n");
|
|
|
|
}
|
|
}
|
|
}
|
|
#pragma warning restore 1591
|