@model Disco.Web.Areas.Config.Models.DeviceProfile.ShowModel @using Disco.Services.Devices.ManagedGroups; @using Disco.Web.Areas.Config.Models.Shared; @{ 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"); } }
@if (hideAdvanced) { }
Id: @Html.DisplayFor(model => model.DeviceProfile.Id)
Name: @if (canConfig) { @Html.TextBoxFor(model => model.DeviceProfile.Name) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader() } else { @Model.DeviceProfile.Name }
Short Name: @if (canConfig) { @Html.TextBoxFor(model => model.DeviceProfile.ShortName) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader() } else { @Model.DeviceProfile.ShortName }
Description: @if (canConfig) { @Html.EditorFor(model => model.DeviceProfile.Description) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader() } else { @Model.DeviceProfile.Description }
Members
@Model.DeviceCount.ToString("n0") @(Model.DeviceCount == 1 ? "devices is a member" : "devices are members") of this profile.
@if (Model.DeviceDecommissionedCount > 0) {
@Model.DeviceDecommissionedCount.ToString("n0") @(Model.DeviceDecommissionedCount == 1 ? "device is" : "devices are") decommissioned.
}
Distribution Type: @if (canConfig) { @Html.DropDownList("DeviceProfile_DistributionType", Model.DeviceProfileDistributionTypes) @AjaxHelpers.AjaxLoader() } else { @Model.DeviceProfile.DistributionType.ToString() }

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.

Address: @if (canConfig) { @Html.DropDownListFor(m => m.DeviceProfile.DefaultOrganisationAddress, Model.OrganisationAddresses.ToSelectListItems(Model.DeviceProfile.DefaultOrganisationAddress, true, "None")) @AjaxHelpers.AjaxLoader() } else { if (Model.DefaultOrganisationAddress == null) { <None Specified> } else { @Model.DefaultOrganisationAddress.ToString() } }

The profile address is used to separate jobs for multi-site mode. It is also suggested as the default address for warranty/repair actions.

Policies
@if (canConfig) { } else { } @AjaxHelpers.AjaxLoader()

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 Computer Name Template Expression and the Organisational Unit configuration options below).

@if (canConfig) { } else { } @AjaxHelpers.AjaxLoader()

When enabled the user assigned to the device will be added to the Local Administrators group during device enrolment.

@if (canConfig) { } else { } @AjaxHelpers.AjaxLoader()

When enabled an untrusted device enrolment will be allowed if a Software - Reimage job is open for the device.

Computer Name
Template Expression:
@if (string.IsNullOrWhiteSpace(Model.DeviceProfile.ComputerNameTemplate)) { <None Specified> } else { @Model.DeviceProfile.ComputerNameTemplate }
@if (canConfig && canConfigExpression) { Change@AjaxHelpers.AjaxLoader()
@using (Html.BeginForm(MVC.API.DeviceProfile.UpdateComputerNameTemplate(Model.DeviceProfile.Id, null, false))) { @Html.AntiForgeryToken() @Html.TextArea("ComputerNameTemplate", Model.DeviceProfile.ComputerNameTemplate, new { spellcheck = "false", required = "required" }) } @AjaxHelpers.AjaxLoader()
}
@if (canConfig) { } else { } @AjaxHelpers.AjaxLoader()

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.

Organisational Unit: @if (canConfig) {
@Model.FriendlyOrganisationalUnitName
Change@AjaxHelpers.AjaxLoader()
@AjaxHelpers.AjaxLoader() Loading Organisational Units
@using (Html.BeginForm(MVC.API.DeviceProfile.UpdateOrganisationalUnit(Model.DeviceProfile.Id, redirect: true), FormMethod.Post)) { @Html.AntiForgeryToken();
}
} else {
@Model.FriendlyOrganisationalUnitName
} @if (!Model.OrganisationalUnitExists) {

The Organisational Unit could not be found.

}
@if (canConfig) { } else { } @AjaxHelpers.AjaxLoader()

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 Enforce Organisational Unit option is enabled the Active Directory account will be moved into this organisational unit during enrolment.

Provision Certificates: @if (canConfig && (Model.CertificateProviders.Count > 0 || Model.CertificateAuthorityProviders.Count > 0)) {
@AjaxHelpers.AjaxLoader("DeviceProfile_CertificateProviders") } @if (canConfig && Model.CertificateProviders.Count > 0) { } @if (canConfig && Model.CertificateProviders.Count > 0) { }

Device/Machine Certificates

@if (canConfig && Model.CertificateProviders.Count > 0) { @CommonHelpers.CheckBoxList("DeviceProfile_CertificateProviders", "DeviceProfile_CertificateProviders", Model.CertificateProviders.ToSelectListItems(Model.DeviceProfile.GetCertificateProviders())) } else { var certificateProviders = Model.DeviceProfile.GetCertificateProviders().ToList(); if (certificateProviders.Count == 0) { <None Allocated> } else {
    @foreach (var certificateProvider in certificateProviders) {
  • @certificateProvider.Name
  • }
} }

Authority Certificates

@if (canConfig && Model.CertificateAuthorityProviders.Count > 0) { @CommonHelpers.CheckBoxList("DeviceProfile_CertificateAuthorityProviders", "DeviceProfile_CertificateAuthorityProviders", Model.CertificateAuthorityProviders.ToSelectListItems(Model.DeviceProfile.GetCertificateAuthorityProviders())) } else { var certificateProviders = Model.DeviceProfile.GetCertificateAuthorityProviders().ToList(); if (certificateProviders.Count == 0) { <None Allocated> } else {
    @foreach (var certificateProvider in certificateProviders) {
  • @certificateProvider.Name
  • }
} } @if (canViewPlugins) {

View the Plugin Catalogue to discover and install certificate provider plugins.

}
Provision Wireless Profiles: @if (canConfig && Model.WirelessProfileProviders.Count > 0) {
@AjaxHelpers.AjaxLoader("DeviceProfile_WirelessProfileProviders") }
@if (canConfig && Model.WirelessProfileProviders.Count > 0) { @CommonHelpers.CheckBoxList("DeviceProfile_WirelessProfileProviders", "DeviceProfile_WirelessProfileProviders", Model.WirelessProfileProviders.ToSelectListItems(Model.DeviceProfile.GetWirelessProfileProviders())) } else { var wirelessProfileProviders = Model.DeviceProfile.GetWirelessProfileProviders().ToList(); if (wirelessProfileProviders.Count == 0) { <None Allocated> } else {
    @foreach (var wirelessProfileProvider in wirelessProfileProviders) {
  • @wirelessProfileProvider.Name
  • }
} } @if (canViewPlugins) {

View the Plugin Catalogue to discover and install wireless profile provider plugins.

}
Linked Groups:
@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)) }) @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)) }) @if (canConfig) { @Html.Partial(MVC.Config.Shared.Views.LinkedGroupShared) }
@if (canDelete) {

This item will be permanently deleted and cannot be recovered. Are you sure?

} @Html.Partial(MVC.Config.Shared.Views._DeviceGroupDocumentBulkGenerate, Model)
@if (Model.CanDecommission) {
@using (Html.BeginForm(MVC.API.Device.DeviceProfileDecommission(Model.DeviceProfile.Id), FormMethod.Post)) { @Html.AntiForgeryToken()
 Why are these devices to be decommissioned?
    @foreach (DecommissionReasons decommissionReason in Enum.GetValues(typeof(DecommissionReasons)).Cast().OrderBy(r => r.ToString())) {
  • }

}
} @if (canDelete) { @Html.ActionLinkButton("Delete", MVC.API.DeviceProfile.Delete(Model.DeviceProfile.Id, true), "buttonDelete") } @if (Authorization.Has(Claims.Device.Actions.Export)) { @Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.DeviceExportTypes.Profile, Model.DeviceProfile.Id)) } @if (Authorization.Has(Claims.Device.Search) && Model.DeviceCount > 0) { @Html.ActionLinkButton(string.Format("View {0} Device{1}", Model.DeviceCount, (Model.DeviceCount != 1 ? "s" : null)), MVC.Search.Query(Model.DeviceProfile.Id.ToString(), "DeviceProfile")) }