@model Disco.Web.Models.Device.ShowModel @using Disco.Services.Users.UserFlags; @{ Authorization.Require(Claims.Device.Show); Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers"); }
@{
var assignedUser = Model.Device.AssignedUser;
}
@if (Authorization.Has(Claims.Device.Actions.GenerateDocuments))
{
@Html.Partial(MVC.Shared.Views._GenerateDocumentControl, Model.GenerateDocumentControlModel)
}
|
@if (Authorization.Has(Claims.Config.DeviceProfile.Show)) { @Html.ActionLink(Model.Device.DeviceProfile.Name, MVC.Config.DeviceProfile.Index(Model.Device.DeviceProfileId)) } else { @Model.Device.DeviceProfile.Name }
@using (Html.BeginForm(MVC.API.Device.UpdateDeviceProfileId(Model.Device.SerialNumber, redirect: true)))
{
}
@Html.AntiForgeryToken()
@if (Model.Device.DeviceBatchId.HasValue)
{
@if (Authorization.Has(Claims.Config.DeviceBatch.Show)) { @Html.ActionLink(Model.Device.DeviceBatch.Name, MVC.Config.DeviceBatch.Index(Model.Device.DeviceBatchId.Value)) } else { @Model.Device.DeviceBatch.Name }
Batch: Not Associated} @if (Model.Device.CanUpdateDeviceBatch()) {
@using (Html.BeginForm(MVC.API.Device.UpdateDeviceBatchId(Model.Device.SerialNumber, null, true)))
{
@Html.AntiForgeryToken()
|
@if (Authorization.Has(Claims.Config.DeviceModel.Show)) { @Html.ActionLink(Model.Device.DeviceModel.ToString(), MVC.Config.DeviceModel.Index(Model.Device.DeviceModelId)) } else { @Model.Device.DeviceModel.ToString() } |
||||||||||||||||||||||||||||||||||||||
@if (Model.Device.CanCreateJob())
{
Html.BundleDeferred("~/ClientScripts/Modules/Disco-CreateJob");
@Html.ActionLinkSmallButton("Create Job", MVC.Job.Create(Model.Device.SerialNumber, Model.Device.AssignedUserId), "buttonCreateJob")
}
@if (Model.Device.CanUpdateAssignment())
{
Update Assignment
Assign to User:@using (Html.BeginForm(MVC.API.Device.UpdateAssignedUserId(Model.Device.SerialNumber, redirect: true))) { @Html.AntiForgeryToken() }
@using (Html.BeginForm(MVC.API.DeviceFlagAssignment.AddDevice()))
{
@Html.AntiForgeryToken()
}
@if (Model.Device.CanUpdateTrustEnrol())
{
@foreach (var flag in Model.AvailableDeviceFlags.OrderBy(jq => jq.Name))
{
@flag.Name
}
CommentsRemove On12:00 AM
@using (Html.BeginForm(MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, true.ToString(), true)))
{
@Html.AntiForgeryToken()
}
}
@if (Model.Device.CanUpdateUntrustEnrol())
{
Devices flagged as 'trusted' are allowed a single-use device enrolment without providing authentication (for example: Active Directory Computer Account). Once a device enrols, its trust setting is reset and additional enrolments need to be authenticated (domain joined) or manually trusted again. This action will allow a device claiming to have the Serial Number '@(Model.Device.SerialNumber)' to be enrolled without authentication.
Are you sure you want to allow an unauthenticated enrolment?
@using (Html.BeginForm(MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, false.ToString(), true)))
{
@Html.AntiForgeryToken()
}
}
@if (Model.Device.CanDecommission())
{
This action will require the device to enrol with authentication (for example: domain joined).
Are you sure you want to require an authenticated enrolment?
@using (Html.BeginForm(MVC.API.Device.Decommission(Model.Device.SerialNumber, null, true)))
{
@Html.AntiForgeryToken()
}
@if (Model.Device.CanRecommission())
{
Why is this device to be decommissioned?
@using (Html.BeginForm(MVC.API.Device.Recommission(Model.Device.SerialNumber, true)))
{
@Html.AntiForgeryToken()
}
}
@if (Model.Device.CanDelete())
{
Are you sure?
@using (Html.BeginForm(MVC.API.Device.Delete(Model.Device.SerialNumber, true)))
{
@Html.AntiForgeryToken()
}
}
This item will be permanently deleted and cannot be recovered. |