Name:
@if (string.IsNullOrWhiteSpace(Model.Device.DeviceDomainId))
{
<Unknown/Not Allocated>
}
else
{
@Model.Device.ComputerName
}
Domain:
@if (string.IsNullOrWhiteSpace(Model.Device.DeviceDomainId))
{
<Unknown/Not Allocated>
}
else
{
@Model.Device.ComputerDomainName
}
Asset:
@if (Authorization.Has(Claims.Device.Properties.AssetNumber))
{
@Html.TextBoxFor(m => m.Device.AssetNumber, new { @class = "small discreet" }) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader()
}
else
{
@(Model.Device.AssetNumber ?? "Unknown")
}
Location:
@if (Authorization.Has(Claims.Device.Properties.Location))
{
@Html.TextBoxFor(m => m.Device.Location, new { @class = "small discreet" }) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader()
}
else
{
@(Model.Device.Location ?? "Unknown")
}
@if (Authorization.HasAny(Claims.Device.Properties.AssetNumber, Claims.Device.Properties.Location))
{
}
Created:
@CommonHelpers.FriendlyDate(Model.Device.CreatedDate)
@if (Model.Device.DecommissionedDate.HasValue)
{
Decommissioned:
@CommonHelpers.FriendlyDate(Model.Device.DecommissionedDate)
}
Enrolled:
@if (Model.Device.EnrolledDate.HasValue)
{
First: @CommonHelpers.FriendlyDate(Model.Device.EnrolledDate)
if (Model.Device.LastEnrolDate.HasValue && Model.Device.EnrolledDate.Value != Model.Device.LastEnrolDate.Value)
{
Last: @CommonHelpers.FriendlyDate(Model.Device.LastEnrolDate)
}
}
else
{
Never
}
@if (Model.Device.AllowUnauthenticatedEnrol)
{
}
Last Seen:
@{
string lastSeenClass = null;
if (Model.Device.LastNetworkLogonDate.HasValue)
{
if (Model.Device.LastNetworkLogonDate.Value < DateTime.Now.AddDays(-30))
{
lastSeenClass = "error";
}
else
{
if (Model.Device.LastNetworkLogonDate.Value < DateTime.Now.AddDays(-7))
{
lastSeenClass = "alert";
}
}
}
}
@CommonHelpers.FriendlyDate(Model.Device.LastNetworkLogonDate)
@if (!string.IsNullOrEmpty(Model.Device.ComputerName))
{
}
@{
var assignedUser = Model.Device.AssignedUser;
}
Assignment:
@if (assignedUser != null)
{
@if (Authorization.Has(Claims.User.Show))
{
@Html.ActionLink(assignedUser.DisplayName, MVC.User.Show(assignedUser.UserId))
}
else
{
@assignedUser.DisplayName
}
@assignedUser.FriendlyId()
@if (Authorization.Has(Claims.User.ShowDetails))
{
if (!string.IsNullOrWhiteSpace(assignedUser.PhoneNumber))
{
@assignedUser.PhoneNumber
}
if (!string.IsNullOrWhiteSpace(assignedUser.EmailAddress))
{
}
}
@if (Authorization.Has(Claims.User.ShowFlagAssignments))
{
@foreach (var flag in assignedUser.UserFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, UserFlagService.GetUserFlag(f.UserFlagId))))
{
@flag.Item2.Name @if (flag.Item1.Comments != null)
{}@CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUserId)
}
}
}
else
{
Not Assigned
}
@if (Authorization.Has(Claims.Device.Actions.GenerateDocuments))
{
@Html.DropDownList("Device_Show_GenerateDocument", Model.DocumentTemplatesSelectListItems)
}
@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
}
Distribution:
@Model.Device.DeviceProfile.DistributionType.ToString()
Address:
@{
if (Model.DeviceProfileDefaultOrganisationAddress != null)
{
@Model.DeviceProfileDefaultOrganisationAddress.Name
}
else
{
None
}
}
Provision Account:
@(Model.Device.DeviceProfile.ProvisionADAccount ? "Active Directory" : "No")
Allocate Certificate:
@(Model.DeviceProfileCertificateProvider != null ? Model.DeviceProfileCertificateProvider.Name : "No")
@if (Model.Device.CanUpdateDeviceProfile())
{
@Html.ActionLinkSmallButton("Update Profile", MVC.API.Device.UpdateDeviceProfileId(Model.Device.SerialNumber, redirect: true), "Device_Show_Policies_Profile_Actions_Update_Button")
}
@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
}
Purchased:
@CommonHelpers.FriendlyDate(Model.Device.DeviceBatch.PurchaseDate)
Supplier:
@(Model.Device.DeviceBatch.Supplier ?? "Unknown")
Warranty Until:
@CommonHelpers.FriendlyDate(Model.Device.DeviceBatch.WarrantyValidUntil, "Unknown", null)
Insurance Supplier:
@(Model.Device.DeviceBatch.InsuranceSupplier ?? "Unknown")
Insured Until:
@CommonHelpers.FriendlyDate(Model.Device.DeviceBatch.InsuredUntil, "Unknown", null)
}
else
{
Batch: Not Associated
}
@if (Model.Device.CanUpdateDeviceBatch())
{
@Html.ActionLinkSmallButton("Update Batch", MVC.API.Device.UpdateDeviceBatchId(Model.Device.SerialNumber, null, true), "Device_Show_Policies_Batch_Actions_Update_Button")
}
@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)))
{
}
}
@if (Model.Device.CanUpdateTrustEnrol())
{
@Html.ActionLinkSmallButton("Trust Enrol", MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, true.ToString(), true), "Device_Show_Device_Actions_TrustEnrol_Button")
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?
}
@if (Model.Device.CanUpdateUntrustEnrol())
{
@Html.ActionLinkSmallButton("Untrust Enrol", MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, false.ToString(), true), "Device_Show_Device_Actions_UntrustEnrol_Button")
This action will require the device to enrol with authentication (for example: domain joined).
Are you sure you want to require an authenticated enrolment?
}
@if (Model.Device.CanDecommission())
{
@Html.ActionLinkSmallButton("Decommission", MVC.API.Device.Decommission(), "Device_Show_Device_Actions_Decommission_Button")
Why was this Device Decommissioned?
}
@if (Model.Device.CanRecommission())
{
@Html.ActionLinkSmallButton("Recommission", MVC.API.Device.Recommission(Model.Device.SerialNumber, true), "Device_Show_Device_Actions_Recommission_Button")
}
@if (Model.Device.CanDelete())
{
@Html.ActionLinkSmallButton("Delete Device", MVC.API.Device.Delete(Model.Device.SerialNumber, true), "Device_Show_Device_Actions_Delete_Button")
This item will be permanently deleted and cannot be recovered.
Jobs linked to this Device (but not to a User) will be deleted also.
Are you sure?
}