Update: Device Count Details

More information about device membership in Batches, Profiles and
Models.
This commit is contained in:
Gary Sharp
2013-07-25 17:47:40 +10:00
parent ad6b1b19b6
commit 19503366c4
27 changed files with 883 additions and 482 deletions
@@ -20,18 +20,25 @@ namespace Disco.Web.Areas.Config.Controllers
if (id.HasValue)
{
var m = new Models.DeviceBatch.ShowModel()
{
DeviceBatch = dbContext.DeviceBatches.Find(id)
};
if (m.DeviceBatch == null)
{
return RedirectToAction(MVC.Config.DeviceBatch.Index(null));
}
m.CanDelete = m.DeviceBatch.CanDelete(dbContext);
var m = dbContext.DeviceBatches.Where(db => db.Id == id.Value)
.Select(db => new Models.DeviceBatch.ShowModel()
{
DeviceBatch = db,
DeviceCount = db.Devices.Count(),
DeviceDecommissionedCount = db.Devices.Count(d => d.DecommissionedDate.HasValue)
}).FirstOrDefault();
m.DeviceCount = m.DeviceBatch.Devices.Count();
m.DeviceDecommissionedCount = m.DeviceBatch.Devices.Count(d => d.DecommissionedDate.HasValue);
if (m == null || m.DeviceBatch == null)
throw new ArgumentException("Invalid Device Batch Id", "id");
m.DeviceModelMembers = m.DeviceBatch.Devices.GroupBy(d => d.DeviceModel).Select(dG => new Models.DeviceBatch._ShowModelMembership()
{
DeviceModel = dG.Key,
DeviceCount = dG.Count(),
DeviceDecommissionedCount = dG.Count(d => d.DecommissionedDate.HasValue)
}).ToArray().Cast<ConfigDeviceBatchShowModelMembership>().ToList();
m.CanDelete = m.DeviceBatch.CanDelete(dbContext);
m.DeviceModels = dbContext.DeviceModels.ToList();
@@ -46,7 +53,7 @@ namespace Disco.Web.Areas.Config.Controllers
// UI Extensions
UIExtensions.ExecuteExtensions<ConfigDeviceBatchIndexModel>(this.ControllerContext, m);
return View(m);
}
}
@@ -17,16 +17,22 @@ namespace Disco.Web.Areas.Config.Controllers
{
if (id.HasValue)
{
var m = new Models.DeviceModel.ShowModel()
var m = dbContext.DeviceModels.Include("DeviceComponents").Where(dm => dm.Id == id.Value).Select(dm => new Models.DeviceModel.ShowModel()
{
DeviceModel = dbContext.DeviceModels.Include("DeviceComponents.JobSubTypes").Where(dm => dm.Id == id.Value).FirstOrDefault(),
WarrantyProviders = Plugins.GetPluginFeatures(typeof(WarrantyProviderFeature))
};
DeviceModel = dm,
DeviceCount = dm.Devices.Count(),
DeviceDecommissionedCount = dm.Devices.Where(d => d.DecommissionedDate.HasValue).Count()
}).FirstOrDefault();
if (m == null || m.DeviceModel == null)
throw new ArgumentException("Invalid Device Model Id", "id");
m.WarrantyProviders = Plugins.GetPluginFeatures(typeof(WarrantyProviderFeature));
m.DeviceComponentsModel = new Models.DeviceModel.ComponentsModel()
{
DeviceModelId = m.DeviceModel.Id,
DeviceComponents = m.DeviceModel.DeviceComponents.ToList(),
DeviceComponents = dbContext.DeviceComponents.Include("JobSubTypes").Where(dc => dc.DeviceModelId == m.DeviceModel.Id).ToList(),
JobSubTypes = dbContext.JobSubTypes.Where(jst => jst.JobTypeId == Disco.Models.Repository.JobType.JobTypeIds.HNWar).ToList()
};
@@ -20,14 +20,18 @@ namespace Disco.Web.Areas.Config.Controllers
{
if (id.HasValue)
{
var m = new Models.DeviceProfile.ShowModel()
var m = dbContext.DeviceProfiles.Where(dp => dp.Id == id.Value).Select(dp => new Models.DeviceProfile.ShowModel()
{
DeviceProfile = dbContext.DeviceProfiles.Find(id.Value),
OrganisationAddresses = dbContext.DiscoConfiguration.OrganisationAddresses.Addresses,
CertificateProviders = Plugins.GetPluginFeatures(typeof(CertificateProviderFeature))
};
DeviceProfile = dp,
DeviceCount = dp.Devices.Count(),
DeviceDecommissionedCount = dp.Devices.Where(d => d.DecommissionedDate.HasValue).Count()
}).FirstOrDefault();
//m.Devices = BI.DeviceBI.SelectDeviceSearchResultItem(dbContext.Devices.Where(d => d.DeviceProfileId == m.DeviceProfile.Id));
if (m == null || m.DeviceProfile == null)
throw new ArgumentException("Invalid Device Profile Id", "id");
m.OrganisationAddresses = dbContext.DiscoConfiguration.OrganisationAddresses.Addresses;
m.CertificateProviders = Plugins.GetPluginFeatures(typeof(CertificateProviderFeature));
var DistributionValues = Enum.GetValues(typeof(Disco.Models.Repository.DeviceProfile.DistributionTypes));
m.DeviceProfileDistributionTypes = new List<SelectListItem>();
@@ -11,6 +11,7 @@ namespace Disco.Web.Areas.Config.Models.DeviceBatch
{
public Disco.Models.Repository.DeviceBatch DeviceBatch { get; set; }
public List<Disco.Models.Repository.DeviceModel> DeviceModels { get; set; }
public List<ConfigDeviceBatchShowModelMembership> DeviceModelMembers { get; set; }
public int DeviceCount { get; set; }
public int DeviceDecommissionedCount { get; set; }
public bool CanDelete { get; set; }
@@ -0,0 +1,15 @@
using Disco.Models.UI.Config.DeviceBatch;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Disco.Web.Areas.Config.Models.DeviceBatch
{
public class _ShowModelMembership : ConfigDeviceBatchShowModelMembership
{
public Disco.Models.Repository.DeviceModel DeviceModel { get; set; }
public int DeviceCount { get; set; }
public int DeviceDecommissionedCount { get; set; }
}
}
@@ -21,7 +21,8 @@ namespace Disco.Web.Areas.Config.Models.DeviceModel
Manufacturer = dm.Manufacturer,
Model = dm.Model,
ModelType = dm.ModelType,
DeviceCount = dm.Devices.Count
DeviceCount = dm.Devices.Count,
DeviceDecommissionedCount = dm.Devices.Count(d => d.DecommissionedDate.HasValue)
}).ToArray().Cast<ConfigDeviceModelIndexModelItem>().ToList();
return m;
@@ -15,6 +15,9 @@ namespace Disco.Web.Areas.Config.Models.DeviceModel
public List<PluginFeatureManifest> WarrantyProviders { get; set; }
public int DeviceCount { get; set; }
public int DeviceDecommissionedCount { get; set; }
public bool CanDelete { get; set; }
}
}
@@ -15,6 +15,7 @@ namespace Disco.Web.Areas.Config.Models.DeviceModel
public string Model { get; set; }
public string ModelType { get; set; }
public int DeviceCount { get; set; }
public int DeviceDecommissionedCount { get; set; }
public override string ToString()
{
@@ -16,6 +16,9 @@ namespace Disco.Web.Areas.Config.Models.DeviceProfile
public List<PluginFeatureManifest> CertificateProviders { get; set; }
public int DeviceCount { get; set; }
public int DeviceDecommissionedCount { get; set; }
public bool CanDelete { get; set; }
}
}
@@ -53,8 +53,8 @@
}
@if (item.DeviceDecommissionedCount > 0)
{
<span class="smallMessage" title="@(item.DeviceDecommissionedCount) Decommissioned">
(@(item.DeviceDecommissionedCount))</span>
<span class="smallMessage" title="@(item.DeviceDecommissionedCount.ToString("n0")) Decommissioned">
(@(item.DeviceDecommissionedCount.ToString("n0")))</span>
}
</td>
</tr>
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18033
// Runtime Version:4.0.30319.18051
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -229,22 +229,22 @@ WriteLiteral(" <span");
WriteLiteral(" class=\"smallMessage\"");
WriteAttribute("title", Tuple.Create(" title=\"", 1775), Tuple.Create("\"", 1831)
WriteAttribute("title", Tuple.Create(" title=\"", 1775), Tuple.Create("\"", 1846)
#line 56 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
, Tuple.Create(Tuple.Create("", 1783), Tuple.Create<System.Object, System.Int32>(item.DeviceDecommissionedCount
, Tuple.Create(Tuple.Create("", 1783), Tuple.Create<System.Object, System.Int32>(item.DeviceDecommissionedCount.ToString("n0")
#line default
#line hidden
, 1783), false)
, Tuple.Create(Tuple.Create(" ", 1816), Tuple.Create("Decommissioned", 1817), true)
, Tuple.Create(Tuple.Create(" ", 1831), Tuple.Create("Decommissioned", 1832), true)
);
WriteLiteral(">\r\n (");
#line 57 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(item.DeviceDecommissionedCount);
Write(item.DeviceDecommissionedCount.ToString("n0"));
#line default
@@ -8,16 +8,14 @@
<div class="form deviceBatches" style="width: 730px">
<table>
<tr>
<th style="width: 150px">
Id:
<th style="width: 150px">Id:
</th>
<td>
@Html.DisplayFor(model => model.DeviceBatch.Id)
</td>
</tr>
<tr>
<th>
Name:
<th>Name:
</th>
<td>@Html.EditorFor(model => model.DeviceBatch.Name)
@AjaxHelpers.AjaxSave()
@@ -35,35 +33,86 @@
</td>
</tr>
<tr>
<th>
Device Count:
<th>Default Device Model:
</th>
<td>
@if (Model.DeviceBatch.UnitQuantity.HasValue)
{
<span>@Model.DeviceCount of @(Model.DeviceBatch.UnitQuantity.Value)</span>
@Html.DropDownListFor(model => model.DeviceBatch.DefaultDeviceModelId, Model.DeviceModels.ToSelectListItems())
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(function () {
document.DiscoFunctions.PropertyChangeHelper(
$('#DeviceBatch_DefaultDeviceModelId'),
null,
'@(Url.Action(MVC.API.DeviceBatch.UpdateDefaultDeviceModelId(Model.DeviceBatch.Id)))',
'DefaultDeviceModelId'
);
});
</script>
<br />
<span class="smallMessage">Devices added offline will default to this Device Model.
Once a device enrols the Device Model will be accurately represented.</span>
</td>
</tr>
<tr>
<th>Devices</th>
<td>
@if (Model.DeviceModelMembers.Count > 0)
{
<table class="tableData smallTable">
<thead>
<tr>
<th>Model</th>
<th>Device Count</th>
<th>Decommissioned</th>
</tr>
</thead>
<tbody>
@foreach (var membership in Model.DeviceModelMembers.OrderByDescending(dmm => dmm.DeviceCount))
{
<tr>
<td>
@Html.ActionLink(membership.DeviceModel.ToString(), MVC.Config.DeviceModel.Index(membership.DeviceModel.Id))
</td>
<td>
@membership.DeviceCount.ToString("n0")
</td>
<td>
@membership.DeviceDecommissionedCount.ToString("n0")
</td>
</tr>
}
</tbody>
<tfoot>
<tr>
<th>Total Models: @Model.DeviceModelMembers.Count.ToString("n0")</th>
<th>@Model.DeviceCount.ToString("n0")</th>
<th>@Model.DeviceDecommissionedCount.ToString("n0")</th>
</tr>
</tfoot>
</table>
}
else
{
@Model.DeviceCount
{
<div class="smallMessage">No device models are referenced in this batch.</div>
}
managed by Disco
@if (Model.DeviceDecommissionedCount > 0)
{
<span class="smallMessage">(@(Model.DeviceDecommissionedCount)
Decommissioned)</span>
@if (Model.DeviceBatch.UnitQuantity.HasValue && Model.DeviceBatch.UnitQuantity.Value > Model.DeviceCount)
{
var missingCount = Model.DeviceBatch.UnitQuantity.Value - Model.DeviceCount;
<div style="padding: 0.7em 0.7em; margin-top: 20px;" class="ui-state-highlight ui-corner-all">
<span style="margin-right: 0.3em; float: left;" class="ui-icon ui-icon-alert"></span>
@Model.DeviceCount.ToString("n0") of @(Model.DeviceBatch.UnitQuantity.Value.ToString("n0")) purchased devices are managed by Disco. <strong>@missingCount.ToString("n0") @(missingCount == 1 ? "is" : "are") not managed</strong>.
</div>
}
</td>
</tr>
<tr>
<th>
Purchase:
<th>Purchase:
</th>
<td class="details">
<table class="sub">
<tr>
<th class="name" style="width: 100px">
Purchase Date:
<th class="name" style="width: 100px">Purchase Date:
</th>
<td>
@Html.EditorFor(model => model.DeviceBatch.PurchaseDate)
@@ -84,8 +133,7 @@
</td>
</tr>
<tr>
<th>
Supplier:
<th>Supplier:
</th>
<td>
@Html.EditorFor(model => model.DeviceBatch.Supplier)
@@ -104,8 +152,7 @@
</td>
</tr>
<tr>
<th>
Unit Cost:
<th>Unit Cost:
</th>
<td>
@Html.EditorFor(model => model.DeviceBatch.UnitCost)
@@ -124,8 +171,7 @@
</td>
</tr>
<tr>
<th>
Quantity:
<th>Quantity:
</th>
<td>
@Html.EditorFor(model => model.DeviceBatch.UnitQuantity)
@@ -201,37 +247,12 @@
</td>
</tr>
<tr>
<th>
Default Device Model:
</th>
<td>
@Html.DropDownListFor(model => model.DeviceBatch.DefaultDeviceModelId, Model.DeviceModels.ToSelectListItems())
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(function () {
document.DiscoFunctions.PropertyChangeHelper(
$('#DeviceBatch_DefaultDeviceModelId'),
null,
'@(Url.Action(MVC.API.DeviceBatch.UpdateDefaultDeviceModelId(Model.DeviceBatch.Id)))',
'DefaultDeviceModelId'
);
});
</script>
<br />
<span class="smallMessage">Devices added offline will default to this Device Model.
Once a device enrols the Device Model will be accurately represented.</span>
</td>
</tr>
<tr>
<th>
Warranty:
<th>Warranty:
</th>
<td class="details">
<table class="sub">
<tr>
<th class="name" style="width: 100px">
Valid Until:
<th class="name" style="width: 100px">Valid Until:
</th>
<td>
@Html.EditorFor(model => model.DeviceBatch.WarrantyValidUntil)
@@ -309,14 +330,12 @@
</td>
</tr>
<tr>
<th>
Insurance:
<th>Insurance:
</th>
<td class="details">
<table class="sub">
<tr>
<th class="name" style="width: 100px">
Supplier:
<th class="name" style="width: 100px">Supplier:
</th>
<td>
@Html.EditorFor(model => model.DeviceBatch.InsuranceSupplier)
@@ -335,8 +354,7 @@
</td>
</tr>
<tr>
<th class="name">
Insured Date:
<th class="name">Insured Date:
</th>
<td>
@Html.EditorFor(model => model.DeviceBatch.InsuredDate)
@@ -357,8 +375,7 @@
</td>
</tr>
<tr>
<th class="name">
Insured Until:
<th class="name">Insured Until:
</th>
<td>
@Html.EditorFor(model => model.DeviceBatch.InsuredUntil)
@@ -435,8 +452,7 @@
</td>
</tr>
<tr>
<th>
Comments:<br />
<th>Comments:<br />
@AjaxHelpers.AjaxLoader("ajaxComments")
</th>
<td>
@@ -499,6 +515,7 @@
}
@if (Model.DeviceCount > 0)
{
@Html.ActionLinkButton("Export Devices", MVC.API.DeviceBatch.ExportDevices(Model.DeviceBatch.Id))
@Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceBatch.Id.ToString(), "DeviceBatch"))
}
</div>
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18033
// Runtime Version:4.0.30319.18051
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -61,22 +61,22 @@ WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th");
WriteLiteral(" style=\"width: 150px\"");
WriteLiteral(">\r\n Id:\r\n </th>\r\n <td>\r\n");
WriteLiteral(">Id:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 15 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 14 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.DisplayFor(model => model.DeviceBatch.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>");
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>Name:\r\n " +
" </th>\r\n <td>");
#line 22 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 20 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.Name));
@@ -87,7 +87,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 23 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 21 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxSave());
@@ -98,7 +98,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 24 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 22 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
@@ -113,45 +113,246 @@ WriteLiteral(">\r\n $(function () {\r\n
",\r\n \'Invalid Name\',\r\n \'");
#line 30 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 28 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Url.Action(MVC.API.DeviceBatch.UpdateName(Model.DeviceBatch.Id)));
#line default
#line hidden
WriteLiteral(@"',
'BatchName'
);
});
</script>
</td>
</tr>
<tr>
<th>
Device Count:
</th>
<td>
");
WriteLiteral("\',\r\n \'BatchName\'\r\n );\r\n " +
" });\r\n </script>\r\n </td>\r\n </tr>\r\n " +
" <tr>\r\n <th>Default Device Model:\r\n </th>\r\n " +
" <td>\r\n");
WriteLiteral(" ");
#line 42 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 39 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.DropDownListFor(model => model.DeviceBatch.DefaultDeviceModelId, Model.DeviceModels.ToSelectListItems()));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 40 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 41 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
WriteLiteral("\r\n <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFun" +
"ctions.PropertyChangeHelper(\r\n $(\'#DeviceBatch_Defaul" +
"tDeviceModelId\'),\r\n null,\r\n " +
" \'");
#line 47 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Url.Action(MVC.API.DeviceBatch.UpdateDefaultDeviceModelId(Model.DeviceBatch.Id)));
#line default
#line hidden
WriteLiteral("\',\r\n \'DefaultDeviceModelId\'\r\n )" +
";\r\n });\r\n </script>\r\n <br />\r\n " +
" <span");
WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">Devices added offline will default to this Device Model.\r\n On" +
"ce a device enrols the Device Model will be accurately represented.</span>\r\n " +
" </td>\r\n </tr>\r\n <tr>\r\n <th>Devices</th>\r\n " +
" <td>\r\n");
#line 60 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line default
#line hidden
#line 42 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
if (Model.DeviceBatch.UnitQuantity.HasValue)
{
#line 60 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
if (Model.DeviceModelMembers.Count > 0)
{
#line default
#line hidden
WriteLiteral(" <span>");
WriteLiteral(" <table");
WriteLiteral(" class=\"tableData smallTable\"");
WriteLiteral(@">
<thead>
<tr>
<th>Model</th>
<th>Device Count</th>
<th>Decommissioned</th>
</tr>
</thead>
<tbody>
");
#line 44 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Model.DeviceCount);
#line 71 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line default
#line hidden
#line 71 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
foreach (var membership in Model.DeviceModelMembers.OrderByDescending(dmm => dmm.DeviceCount))
{
#line default
#line hidden
WriteLiteral(" <tr>\r\n <td>\r\n");
WriteLiteral(" ");
#line 75 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.ActionLink(membership.DeviceModel.ToString(), MVC.Config.DeviceModel.Index(membership.DeviceModel.Id)));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n " +
"<td>\r\n");
WriteLiteral(" ");
#line 78 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(membership.DeviceCount.ToString("n0"));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n " +
"<td>\r\n");
WriteLiteral(" ");
#line 81 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(membership.DeviceDecommissionedCount.ToString("n0"));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr" +
">\r\n");
#line 84 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
}
#line default
#line hidden
WriteLiteral(" </tbody>\r\n <tfoot>\r\n " +
" <tr>\r\n <th>Total Models: ");
#line 88 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Model.DeviceModelMembers.Count.ToString("n0"));
#line default
#line hidden
WriteLiteral("</th>\r\n <th>");
#line 89 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Model.DeviceCount.ToString("n0"));
#line default
#line hidden
WriteLiteral("</th>\r\n <th>");
#line 90 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Model.DeviceDecommissionedCount.ToString("n0"));
#line default
#line hidden
WriteLiteral("</th>\r\n </tr>\r\n </tfoot>\r\n " +
" </table>\r\n");
#line 94 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
}
else
{
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">No device models are referenced in this batch.</div>\r\n");
#line 98 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
}
#line default
#line hidden
WriteLiteral(" ");
#line 99 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
if (Model.DeviceBatch.UnitQuantity.HasValue && Model.DeviceBatch.UnitQuantity.Value > Model.DeviceCount)
{
var missingCount = Model.DeviceBatch.UnitQuantity.Value - Model.DeviceCount;
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" style=\"padding: 0.7em 0.7em; margin-top: 20px;\"");
WriteLiteral(" class=\"ui-state-highlight ui-corner-all\"");
WriteLiteral(">\r\n <span");
WriteLiteral(" style=\"margin-right: 0.3em; float: left;\"");
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
WriteLiteral("></span>\r\n");
WriteLiteral(" ");
#line 104 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Model.DeviceCount.ToString("n0"));
#line default
@@ -159,78 +360,41 @@ WriteLiteral(" <span>");
WriteLiteral(" of ");
#line 44 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Model.DeviceBatch.UnitQuantity.Value);
#line 104 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Model.DeviceBatch.UnitQuantity.Value.ToString("n0"));
#line default
#line hidden
WriteLiteral("</span>\r\n");
WriteLiteral(" purchased devices are managed by Disco. <strong>");
#line 45 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
}
else
{
#line default
#line hidden
#line 48 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Model.DeviceCount);
#line 104 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(missingCount.ToString("n0"));
#line default
#line hidden
WriteLiteral(" ");
#line 48 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 104 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(missingCount == 1 ? "is" : "are");
#line default
#line hidden
WriteLiteral(" not managed</strong>.\r\n </div>\r\n");
#line 106 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
}
#line default
#line hidden
WriteLiteral(" managed by Disco\r\n");
#line 51 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line default
#line hidden
#line 51 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
if (Model.DeviceDecommissionedCount > 0)
{
#line default
#line hidden
WriteLiteral(" <span");
WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">(");
#line 53 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Model.DeviceDecommissionedCount);
#line default
#line hidden
WriteLiteral("\r\n Decommissioned)</span>\r\n");
#line 55 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Purchase:\r\n </th>\r\n <td");
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Purchase:\r\n " +
" </th>\r\n <td");
WriteLiteral(" class=\"details\"");
@@ -244,13 +408,12 @@ WriteLiteral(" class=\"name\"");
WriteLiteral(" style=\"width: 100px\"");
WriteLiteral(">\r\n Purchase Date:\r\n </th>\r\n " +
" <td>\r\n");
WriteLiteral(">Purchase Date:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 69 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 118 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.PurchaseDate));
@@ -261,7 +424,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 70 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 119 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
@@ -277,7 +440,7 @@ WriteLiteral(@"
'");
#line 77 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 126 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Url.Action(MVC.API.DeviceBatch.UpdatePurchaseDate(Model.DeviceBatch.Id)));
@@ -293,8 +456,7 @@ WriteLiteral(@"',
</td>
</tr>
<tr>
<th>
Supplier:
<th>Supplier:
</th>
<td>
");
@@ -302,7 +464,7 @@ WriteLiteral(@"',
WriteLiteral(" ");
#line 91 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 139 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.Supplier));
@@ -313,7 +475,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 92 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 140 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxSave());
@@ -324,7 +486,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 93 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 141 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
@@ -342,7 +504,7 @@ WriteLiteral(@">
'");
#line 99 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 147 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Url.Action(MVC.API.DeviceBatch.UpdateSupplier(Model.DeviceBatch.Id)));
@@ -356,8 +518,7 @@ WriteLiteral(@"',
</td>
</tr>
<tr>
<th>
Unit Cost:
<th>Unit Cost:
</th>
<td>
");
@@ -365,7 +526,7 @@ WriteLiteral(@"',
WriteLiteral(" ");
#line 111 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 158 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.UnitCost));
@@ -376,7 +537,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 112 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 159 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxSave());
@@ -387,7 +548,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 113 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 160 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
@@ -405,7 +566,7 @@ WriteLiteral(@">
'");
#line 119 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 166 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Url.Action(MVC.API.DeviceBatch.UpdateUnitCost(Model.DeviceBatch.Id)));
@@ -419,8 +580,7 @@ WriteLiteral(@"',
</td>
</tr>
<tr>
<th>
Quantity:
<th>Quantity:
</th>
<td>
");
@@ -428,7 +588,7 @@ WriteLiteral(@"',
WriteLiteral(" ");
#line 131 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 177 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.UnitQuantity));
@@ -439,7 +599,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 132 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 178 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxSave());
@@ -450,7 +610,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 133 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 179 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
@@ -468,7 +628,7 @@ WriteLiteral(@">
'");
#line 139 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 185 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Url.Action(MVC.API.DeviceBatch.UpdateUnitQuantity(Model.DeviceBatch.Id)));
@@ -489,7 +649,7 @@ WriteLiteral(" id=\"DeviceBatch_PurchaseDetails_Container\"");
WriteLiteral(">\r\n <div>\r\n Details ");
#line 149 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 195 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader("ajaxPurchaseDetails"));
@@ -500,7 +660,7 @@ WriteLiteral("\r\n </div>\r\n");
WriteLiteral(" ");
#line 151 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 197 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.PurchaseDetails));
@@ -529,7 +689,7 @@ WriteLiteral(@">
url: '");
#line 168 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 214 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Url.Action(MVC.API.DeviceBatch.UpdatePurchaseDetails(Model.DeviceBatch.Id)));
@@ -557,71 +717,8 @@ WriteLiteral("\',\r\n dataType: \'json\',
" $(ed.getWin()).blur(model.updated);\r\n " +
" });\r\n }\r\n " +
" });\r\n });\r\n </script>\r\n " +
" </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n" +
" Default Device Model:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 208 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.DropDownListFor(model => model.DeviceBatch.DefaultDeviceModelId, Model.DeviceModels.ToSelectListItems()));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 209 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 210 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
WriteLiteral("\r\n <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFun" +
"ctions.PropertyChangeHelper(\r\n $(\'#DeviceBatch_Defaul" +
"tDeviceModelId\'),\r\n null,\r\n " +
" \'");
#line 216 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Url.Action(MVC.API.DeviceBatch.UpdateDefaultDeviceModelId(Model.DeviceBatch.Id)));
#line default
#line hidden
WriteLiteral("\',\r\n \'DefaultDeviceModelId\'\r\n )" +
";\r\n });\r\n </script>\r\n <br />\r\n " +
" <span");
WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(@">Devices added offline will default to this Device Model.
Once a device enrols the Device Model will be accurately represented.</span>
</td>
</tr>
<tr>
<th>
Warranty:
</th>
<td");
" </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>Wa" +
"rranty:\r\n </th>\r\n <td");
WriteLiteral(" class=\"details\"");
@@ -635,13 +732,12 @@ WriteLiteral(" class=\"name\"");
WriteLiteral(" style=\"width: 100px\"");
WriteLiteral(">\r\n Valid Until:\r\n </th>\r\n " +
" <td>\r\n");
WriteLiteral(">Valid Until:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 237 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 258 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.WarrantyValidUntil));
@@ -652,7 +748,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 238 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 259 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
@@ -668,7 +764,7 @@ WriteLiteral(@"
'");
#line 245 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 266 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Url.Action(MVC.API.DeviceBatch.UpdateWarrantyValidUntil(Model.DeviceBatch.Id)));
@@ -691,7 +787,7 @@ WriteLiteral(" id=\"DeviceBatch_WarrantyDetails_Container\"");
WriteLiteral(">\r\n <div>\r\n Details ");
#line 257 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 278 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader("ajaxWarrantyDetails"));
@@ -702,7 +798,7 @@ WriteLiteral("\r\n </div>\r\n");
WriteLiteral(" ");
#line 259 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 280 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.WarrantyDetails));
@@ -731,7 +827,7 @@ WriteLiteral(@">
url: '");
#line 276 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 297 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Url.Action(MVC.API.DeviceBatch.UpdateWarrantyDetails(Model.DeviceBatch.Id)));
@@ -759,8 +855,8 @@ WriteLiteral("\',\r\n dataType: \'json\',
" $(ed.getWin()).blur(model.updated);\r\n " +
" });\r\n }\r\n " +
" });\r\n });\r\n </script>\r\n " +
" </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n" +
" Insurance:\r\n </th>\r\n <td");
" </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>In" +
"surance:\r\n </th>\r\n <td");
WriteLiteral(" class=\"details\"");
@@ -774,13 +870,12 @@ WriteLiteral(" class=\"name\"");
WriteLiteral(" style=\"width: 100px\"");
WriteLiteral(">\r\n Supplier:\r\n </th>\r\n " +
" <td>\r\n");
WriteLiteral(">Supplier:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 322 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 341 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.InsuranceSupplier));
@@ -791,7 +886,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 323 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 342 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxSave());
@@ -802,7 +897,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 324 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 343 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
@@ -820,7 +915,7 @@ WriteLiteral(@">
'");
#line 330 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 349 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Url.Action(MVC.API.DeviceBatch.UpdateInsuranceSupplier(Model.DeviceBatch.Id)));
@@ -838,13 +933,12 @@ WriteLiteral(@"',
WriteLiteral(" class=\"name\"");
WriteLiteral(">\r\n Insured Date:\r\n </th>\r\n " +
" <td>\r\n");
WriteLiteral(">Insured Date:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 342 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 360 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.InsuredDate));
@@ -855,7 +949,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 343 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 361 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
@@ -871,7 +965,7 @@ WriteLiteral(@"
'");
#line 350 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 368 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Url.Action(MVC.API.DeviceBatch.UpdateInsuredDate(Model.DeviceBatch.Id)));
@@ -891,13 +985,12 @@ WriteLiteral(@"',
WriteLiteral(" class=\"name\"");
WriteLiteral(">\r\n Insured Until:\r\n </th>\r\n " +
" <td>\r\n");
WriteLiteral(">Insured Until:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 364 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 381 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.InsuredUntil));
@@ -908,7 +1001,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 365 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 382 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
@@ -924,7 +1017,7 @@ WriteLiteral(@"
'");
#line 372 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 389 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Url.Action(MVC.API.DeviceBatch.UpdateInsuredUntil(Model.DeviceBatch.Id)));
@@ -947,7 +1040,7 @@ WriteLiteral(" id=\"DeviceBatch_InsuranceDetails_Container\"");
WriteLiteral(">\r\n <div>\r\n Details ");
#line 384 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 401 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader("ajaxInsuranceDetails"));
@@ -958,7 +1051,7 @@ WriteLiteral("\r\n </div>\r\n");
WriteLiteral(" ");
#line 386 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 403 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.InsuranceDetails));
@@ -985,7 +1078,7 @@ WriteLiteral(@">
url: '");
#line 401 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 418 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Url.Action(MVC.API.DeviceBatch.UpdateInsuranceDetails(Model.DeviceBatch.Id)));
@@ -1015,12 +1108,12 @@ WriteLiteral("\',\r\n dataType: \'json\',
" });\r\n }\r\n " +
" });\r\n });\r\n </scr" +
"ipt>\r\n </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
" <th>\r\n Comments:<br />\r\n");
" <th>Comments:<br />\r\n");
WriteLiteral(" ");
#line 440 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 456 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader("ajaxComments"));
@@ -1031,7 +1124,7 @@ WriteLiteral("\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 443 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 459 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.Comments));
@@ -1058,7 +1151,7 @@ WriteLiteral(@">
url: '");
#line 458 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 474 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Url.Action(MVC.API.DeviceBatch.UpdateComments(Model.DeviceBatch.Id)));
@@ -1093,13 +1186,13 @@ WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n");
#line 496 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 512 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line default
#line hidden
#line 496 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 512 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
if (Model.CanDelete)
{
@@ -1107,14 +1200,14 @@ WriteLiteral(">\r\n");
#line default
#line hidden
#line 498 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 514 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.ActionLinkButton("Delete", MVC.API.DeviceBatch.Delete(Model.DeviceBatch.Id, true), "buttonDelete"));
#line default
#line hidden
#line 498 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 514 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
}
@@ -1124,7 +1217,7 @@ WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 500 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 516 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
if (Model.DeviceCount > 0)
{
@@ -1132,14 +1225,28 @@ WriteLiteral(" ");
#line default
#line hidden
#line 502 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 518 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.ActionLinkButton("Export Devices", MVC.API.DeviceBatch.ExportDevices(Model.DeviceBatch.Id)));
#line default
#line hidden
#line 518 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line default
#line hidden
#line 519 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceBatch.Id.ToString(), "DeviceBatch")));
#line default
#line hidden
#line 502 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 519 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
}
@@ -37,6 +37,11 @@
</td>
<td>
@item.DeviceCount.ToString("n0")
@if (item.DeviceDecommissionedCount > 0)
{
<span class="smallMessage" title="@(item.DeviceDecommissionedCount) Decommissioned">
(@(item.DeviceDecommissionedCount.ToString("n0")))</span>
}
</td>
</tr>
}
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18033
// Runtime Version:4.0.30319.18051
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -141,10 +141,59 @@ WriteLiteral(" ");
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
WriteLiteral("\r\n");
#line 40 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
#line default
#line hidden
#line 40 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
if (item.DeviceDecommissionedCount > 0)
{
#line default
#line hidden
WriteLiteral(" <span");
WriteLiteral(" class=\"smallMessage\"");
WriteAttribute("title", Tuple.Create(" title=\"", 1167), Tuple.Create("\"", 1223)
#line 42 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
, Tuple.Create(Tuple.Create("", 1175), Tuple.Create<System.Object, System.Int32>(item.DeviceDecommissionedCount
#line default
#line hidden
, 1175), false)
, Tuple.Create(Tuple.Create(" ", 1208), Tuple.Create("Decommissioned", 1209), true)
);
WriteLiteral(">\r\n (");
#line 43 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
Write(item.DeviceDecommissionedCount.ToString("n0"));
#line default
#line hidden
WriteLiteral(")</span>\r\n");
#line 44 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n");
#line 47 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
}
@@ -159,7 +208,7 @@ WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 45 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
#line 50 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
Write(Html.ActionLinkButton("Generic Components", MVC.Config.DeviceModel.GenericComponents()));
@@ -37,6 +37,16 @@
@Html.DisplayFor(model => model.DeviceModel.Model)
</td>
</tr>
<tr>
<th>Statistics</th>
<td>
<div><strong>@Model.DeviceCount.ToString("n0")</strong> @(Model.DeviceCount == 1 ? "devices is" : "devices are") of this model type.</div>
@if (Model.DeviceDecommissionedCount > 0)
{
<div class="smallMessage">@Model.DeviceDecommissionedCount.ToString("n0") @(Model.DeviceDecommissionedCount == 1 ? "device is" : "devices are") decommissioned.</div>
}
</td>
</tr>
<tr>
<th>
Default Purchase Date:
@@ -201,5 +211,6 @@
{
@Html.ActionLinkButton("Delete", MVC.API.DeviceModel.Delete(Model.DeviceModel.Id, true), "buttonDelete")
}
@Html.ActionLinkButton("Export Devices", MVC.API.DeviceModel.ExportDevices(Model.DeviceModel.Id))
@Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceModel.Id.ToString(), "DeviceModel"))
</div>
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18033
// Runtime Version:4.0.30319.18051
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -125,13 +125,79 @@ WriteLiteral(" ");
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Default Purchase Date:\r\n </th>\r\n <td>\r\n");
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>Statistics</th>" +
"\r\n <td>\r\n <div><strong>");
#line 43 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Model.DeviceCount.ToString("n0"));
#line default
#line hidden
WriteLiteral("</strong> ");
#line 43 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Model.DeviceCount == 1 ? "devices is" : "devices are");
#line default
#line hidden
WriteLiteral(" of this model type.</div>\r\n");
#line 44 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line default
#line hidden
#line 44 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
if (Model.DeviceDecommissionedCount > 0)
{
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">");
#line 46 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Model.DeviceDecommissionedCount.ToString("n0"));
#line default
#line hidden
WriteLiteral(" ");
#line 46 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Model.DeviceDecommissionedCount == 1 ? "device is" : "devices are");
#line default
#line hidden
WriteLiteral(" decommissioned.</div>\r\n");
#line 47 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Default Purchase Date:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 45 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line 55 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceModel.DefaultPurchaseDate));
@@ -142,7 +208,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 46 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line 56 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
@@ -154,7 +220,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n
WriteLiteral(" ");
#line 54 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line 64 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.DropDownListFor(model => model.DeviceModel.DefaultWarrantyProvider, Model.WarrantyProviders.ToSelectListItems(Model.DeviceModel.DefaultWarrantyProvider, true, "None")));
@@ -165,7 +231,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 55 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line 65 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
@@ -177,7 +243,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n
WriteLiteral(" ");
#line 63 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line 73 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.DisplayFor(model => model.DeviceModel.ModelType));
@@ -188,14 +254,14 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n
WriteLiteral(" alt=\"Model Image\"");
WriteAttribute("src", Tuple.Create(" src=\"", 2151), Tuple.Create("\"", 2248)
WriteAttribute("src", Tuple.Create(" src=\"", 2690), Tuple.Create("\"", 2787)
#line 71 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
, Tuple.Create(Tuple.Create("", 2157), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(Model.DeviceModel.Id, Model.DeviceModel.ImageHash()))
#line 81 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
, Tuple.Create(Tuple.Create("", 2696), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(Model.DeviceModel.Id, Model.DeviceModel.ImageHash()))
#line default
#line hidden
, 2157), false)
, 2696), false)
);
WriteLiteral(" />\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
@@ -207,13 +273,13 @@ WriteLiteral(">\r\n Update Image:\r\n </label>
"\r\n <td>\r\n");
#line 81 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line 91 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line default
#line hidden
#line 81 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line 91 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
using (Html.BeginForm(MVC.API.DeviceModel.Image(Model.DeviceModel.Id, true, null), FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@@ -243,7 +309,7 @@ WriteLiteral(" value=\"Update\"");
WriteLiteral(" />\r\n");
#line 85 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line 95 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
}
@@ -276,7 +342,7 @@ WriteLiteral(@">
url: '");
#line 109 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line 119 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Url.Action(MVC.API.DeviceModel.UpdateDescription(Model.DeviceModel.Id)));
@@ -331,7 +397,7 @@ WriteLiteral(@">
$.getJSON('");
#line 151 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line 161 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Url.Action(MVC.API.DeviceModel.UpdateDefaultPurchaseDate(Model.DeviceModel.Id)));
@@ -369,7 +435,7 @@ WriteLiteral(@">
url: '");
#line 176 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line 186 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Url.Action(MVC.API.DeviceModel.UpdateDefaultWarrantyProvider(Model.DeviceModel.Id)));
@@ -400,7 +466,7 @@ WriteLiteral(@"',
");
#line 198 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line 208 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.Partial(MVC.Config.DeviceModel.Views._DeviceComponentsTable, Model.DeviceComponentsModel));
@@ -413,13 +479,13 @@ WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n");
#line 200 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line 210 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line default
#line hidden
#line 200 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line 210 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
if (Model.CanDelete)
{
@@ -427,14 +493,14 @@ WriteLiteral(">\r\n");
#line default
#line hidden
#line 202 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line 212 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.ActionLinkButton("Delete", MVC.API.DeviceModel.Delete(Model.DeviceModel.Id, true), "buttonDelete"));
#line default
#line hidden
#line 202 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line 212 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
}
@@ -444,7 +510,18 @@ WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 204 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line 214 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.ActionLinkButton("Export Devices", MVC.API.DeviceModel.ExportDevices(Model.DeviceModel.Id)));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 215 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceModel.Id.ToString(), "DeviceModel")));
@@ -7,16 +7,14 @@
<div id="configurationDeviceProfileShow" class="form" style="width: 600px">
<table>
<tr>
<th>
Id:
<th>Id:
</th>
<td>
@Html.DisplayFor(model => model.DeviceProfile.Id)
</td>
</tr>
<tr>
<th>
Name:
<th>Name:
</th>
<td>@Html.TextBoxFor(model => model.DeviceProfile.Name)
@AjaxHelpers.AjaxSave()
@@ -63,8 +61,7 @@
</td>
</tr>
<tr>
<th>
Short Name:
<th>Short Name:
</th>
<td>@Html.TextBoxFor(model => model.DeviceProfile.ShortName)
@AjaxHelpers.AjaxSave()
@@ -111,8 +108,7 @@
</td>
</tr>
<tr>
<th>
Description:
<th>Description:
</th>
<td>@Html.TextBoxFor(model => model.DeviceProfile.Description)
@AjaxHelpers.AjaxSave()
@@ -159,8 +155,17 @@
</td>
</tr>
<tr>
<th>
Distribution Type:
<th>Members</th>
<td>
<div><strong>@Model.DeviceCount.ToString("n0")</strong> @(Model.DeviceCount == 1 ? "devices is a member" : "devices are members") of this profile.</div>
@if (Model.DeviceDecommissionedCount > 0)
{
<div class="smallMessage">@Model.DeviceDecommissionedCount.ToString("n0") @(Model.DeviceDecommissionedCount == 1 ? "device is" : "devices are") decommissioned.</div>
}
</td>
</tr>
<tr>
<th>Distribution Type:
</th>
<td>
@Html.DropDownList("DeviceProfile_DistributionType", Model.DeviceProfileDistributionTypes)
@@ -185,8 +190,7 @@
</td>
</tr>
<tr>
<th>
Address:
<th>Address:
</th>
<td>
@Html.DropDownListFor(m => m.DeviceProfile.DefaultOrganisationAddress, Model.OrganisationAddresses.ToSelectListItems(Model.DeviceProfile.DefaultOrganisationAddress, true, "None"))
@@ -211,8 +215,7 @@
</td>
</tr>
<tr>
<th>
Allocate Certificates:
<th>Allocate Certificates:
</th>
<td>
@Html.DropDownListFor(model => model.DeviceProfile.CertificateProviderId, Model.CertificateProviders.ToSelectListItems(null, true, "Not Allocated"))
@@ -248,14 +251,12 @@
</td>
</tr>
<tr>
<th>
Computer Name Template Expression:
<th>Computer Name Template Expression:
</th>
<td>@Html.TextBoxFor(model => model.DeviceProfile.ComputerNameTemplate)
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
<a id="expressionBrowserAnchor" href="@(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser()))">
&nbsp;</a>
<a id="expressionBrowserAnchor" href="@(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser()))">&nbsp;</a>
<script type="text/javascript">
$(function () {
var $ComputerNameTemplate = $('#DeviceProfile_ComputerNameTemplate');
@@ -345,8 +346,7 @@
</td>
</tr>
<tr>
<th>
Default Organisational Unit:
<th>Default Organisational Unit:
</th>
<td>
@Html.HiddenFor(model => model.DeviceProfile.OrganisationalUnit)
@@ -428,37 +428,37 @@
var ouChange = function () {
if (!ouTreeLoaded) {
$.getJSON('@(Url.Action(MVC.API.DeviceProfile.OrganisationalUnits()))', null, function (data) {
var dynatreeDataTransformer = function (element) {
var child = {
title: element.Name,
key: element.Path,
isFolder: true
}
if (element.Children) {
child.children = [];
for (var i = 0; i < element.Children.length; i++) {
child.children.push(dynatreeDataTransformer(element.Children[i]));
}
}
return child;
};
var dynatreeData = [];
for (var i = 0; i < data.length; i++) {
dynatreeData.push(dynatreeDataTransformer(data[i]));
var dynatreeDataTransformer = function (element) {
var child = {
title: element.Name,
key: element.Path,
isFolder: true
}
ouTree.dynatree({
children: dynatreeData,
onActivate: function (node) {
//alert('node selected: ' + node.data.key);
if (element.Children) {
child.children = [];
for (var i = 0; i < element.Children.length; i++) {
child.children.push(dynatreeDataTransformer(element.Children[i]));
}
});
ouTreeLoaded = true;
ouUpdateTree();
}
return child;
};
var dynatreeData = [];
for (var i = 0; i < data.length; i++) {
dynatreeData.push(dynatreeDataTransformer(data[i]));
}
ouTree.dynatree({
children: dynatreeData,
onActivate: function (node) {
//alert('node selected: ' + node.data.key);
}
});
} else {
ouTreeLoaded = true;
ouUpdateTree();
}
});
} else {
ouUpdateTree();
}
ouDialog.dialog('open');
};
@@ -497,7 +497,8 @@
<div id="dialogConfirmDelete" title="Delete this Device Profile?">
<p>
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
This item will be permanently deleted and cannot be recovered. Are you sure?</p>
This item will be permanently deleted and cannot be recovered. Are you sure?
</p>
</div>
<script type="text/javascript">
$(function () {
@@ -532,5 +533,6 @@
{
@Html.ActionLinkButton("Delete", MVC.API.DeviceProfile.Delete(Model.DeviceProfile.Id, true), "buttonDelete")
}
@Html.ActionLinkButton("Export Devices", MVC.API.DeviceProfile.ExportDevices(Model.DeviceProfile.Id))
@Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceProfile.Id.ToString(), "DeviceProfile"))
</div>
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18033
// Runtime Version:4.0.30319.18051
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -58,23 +58,23 @@ WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 600px\"");
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n Id:\r\n " +
"</th>\r\n <td>\r\n");
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>Id:\r\n </th>\r\n " +
" <td>\r\n");
WriteLiteral(" ");
#line 14 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 13 "..\..\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>");
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>Name:\r\n " +
" </th>\r\n <td>");
#line 21 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 19 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Html.TextBoxFor(model => model.DeviceProfile.Name));
@@ -85,7 +85,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 22 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 20 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxSave());
@@ -96,7 +96,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 23 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 21 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
@@ -129,7 +129,7 @@ WriteLiteral(@">
url: '");
#line 44 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 42 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Url.Action(MVC.API.DeviceProfile.UpdateName(Model.DeviceProfile.Id)));
@@ -157,13 +157,12 @@ WriteLiteral(@"',
</td>
</tr>
<tr>
<th>
Short Name:
<th>Short Name:
</th>
<td>");
#line 69 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 66 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Html.TextBoxFor(model => model.DeviceProfile.ShortName));
@@ -174,7 +173,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 70 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 67 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxSave());
@@ -185,7 +184,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 71 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 68 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
@@ -218,7 +217,7 @@ WriteLiteral(@">
url: '");
#line 92 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 89 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Url.Action(MVC.API.DeviceProfile.UpdateShortName(Model.DeviceProfile.Id)));
@@ -246,13 +245,12 @@ WriteLiteral(@"',
</td>
</tr>
<tr>
<th>
Description:
<th>Description:
</th>
<td>");
#line 117 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 113 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Html.TextBoxFor(model => model.DeviceProfile.Description));
@@ -263,7 +261,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 118 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 114 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxSave());
@@ -274,7 +272,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 119 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 115 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
@@ -307,7 +305,7 @@ WriteLiteral(@">
url: '");
#line 140 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 136 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Url.Action(MVC.API.DeviceProfile.UpdateDescription(Model.DeviceProfile.Id)));
@@ -335,16 +333,80 @@ WriteLiteral(@"',
</td>
</tr>
<tr>
<th>
Distribution Type:
</th>
<th>Members</th>
<td>
");
<div><strong>");
#line 160 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Model.DeviceCount.ToString("n0"));
#line default
#line hidden
WriteLiteral("</strong> ");
#line 160 "..\..\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 161 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line default
#line hidden
#line 161 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
if (Model.DeviceDecommissionedCount > 0)
{
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">");
#line 163 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Model.DeviceDecommissionedCount.ToString("n0"));
#line default
#line hidden
WriteLiteral(" ");
#line 163 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Model.DeviceDecommissionedCount == 1 ? "device is" : "devices are");
#line default
#line hidden
WriteLiteral(" decommissioned.</div>\r\n");
#line 164 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Distribution Type" +
":\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 166 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 171 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Html.DropDownList("DeviceProfile_DistributionType", Model.DeviceProfileDistributionTypes));
@@ -355,7 +417,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 167 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 172 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
@@ -374,7 +436,7 @@ WriteLiteral(@">
$.getJSON('");
#line 174 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 179 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Url.Action(MVC.API.DeviceProfile.UpdateDistributionType(Model.DeviceProfile.Id)));
@@ -394,8 +456,7 @@ WriteLiteral(@"', data, function (response, result) {
</td>
</tr>
<tr>
<th>
Address:
<th>Address:
</th>
<td>
");
@@ -403,7 +464,7 @@ WriteLiteral(@"', data, function (response, result) {
WriteLiteral(" ");
#line 192 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 196 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Html.DropDownListFor(m => m.DeviceProfile.DefaultOrganisationAddress, Model.OrganisationAddresses.ToSelectListItems(Model.DeviceProfile.DefaultOrganisationAddress, true, "None")));
@@ -414,7 +475,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 193 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 197 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
@@ -433,7 +494,7 @@ WriteLiteral(@">
$.getJSON('");
#line 200 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 204 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Url.Action(MVC.API.DeviceProfile.UpdateDefaultOrganisationAddress(Model.DeviceProfile.Id)));
@@ -453,8 +514,7 @@ WriteLiteral(@"', data, function (response, result) {
</td>
</tr>
<tr>
<th>
Allocate Certificates:
<th>Allocate Certificates:
</th>
<td>
");
@@ -462,7 +522,7 @@ WriteLiteral(@"', data, function (response, result) {
WriteLiteral(" ");
#line 218 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 221 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Html.DropDownListFor(model => model.DeviceProfile.CertificateProviderId, Model.CertificateProviders.ToSelectListItems(null, true, "Not Allocated")));
@@ -473,7 +533,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 219 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 222 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
@@ -495,7 +555,7 @@ WriteLiteral(@">
url: '");
#line 229 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 232 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Url.Action(MVC.API.DeviceProfile.UpdateCertificateProviderId(Model.DeviceProfile.Id)));
@@ -523,13 +583,12 @@ WriteLiteral(@"',
</td>
</tr>
<tr>
<th>
Computer Name Template Expression:
<th>Computer Name Template Expression:
</th>
<td>");
#line 254 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 256 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Html.TextBoxFor(model => model.DeviceProfile.ComputerNameTemplate));
@@ -540,7 +599,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 255 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 257 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxSave());
@@ -551,7 +610,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 256 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 258 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
@@ -561,17 +620,17 @@ WriteLiteral("\r\n <a");
WriteLiteral(" id=\"expressionBrowserAnchor\"");
WriteAttribute("href", Tuple.Create(" href=\"", 13404), Tuple.Create("\"", 13473)
WriteAttribute("href", Tuple.Create(" href=\"", 13810), Tuple.Create("\"", 13879)
#line 257 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
, Tuple.Create(Tuple.Create("", 13411), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser())
#line 259 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
, Tuple.Create(Tuple.Create("", 13817), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser())
#line default
#line hidden
, 13411), false)
, 13817), false)
);
WriteLiteral(">\r\n &nbsp;</a>\r\n <script");
WriteLiteral(">&nbsp;</a>\r\n <script");
WriteLiteral(" type=\"text/javascript\"");
@@ -597,7 +656,7 @@ WriteLiteral(@">
url: '");
#line 278 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 279 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Url.Action(MVC.API.DeviceProfile.UpdateComputerNameTemplate(Model.DeviceProfile.Id)));
@@ -640,7 +699,7 @@ WriteLiteral(" type=\"checkbox\"");
WriteLiteral(" ");
#line 301 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 302 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Model.DeviceProfile.ProvisionADAccount ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty));
@@ -651,7 +710,7 @@ WriteLiteral("/>\r\n");
WriteLiteral(" ");
#line 302 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 303 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
@@ -670,7 +729,7 @@ WriteLiteral(@">
$.getJSON('");
#line 309 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 310 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Url.Action(MVC.API.DeviceProfile.UpdateProvisionADAccount(Model.DeviceProfile.Id)));
@@ -706,7 +765,7 @@ WriteLiteral(" type=\"checkbox\"");
WriteLiteral(" ");
#line 325 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 326 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Model.DeviceProfile.EnforceComputerNameConvention ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty));
@@ -717,7 +776,7 @@ WriteLiteral("/>\r\n");
WriteLiteral(" ");
#line 326 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 327 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
@@ -736,7 +795,7 @@ WriteLiteral(@">
$.getJSON('");
#line 333 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 334 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Url.Action(MVC.API.DeviceProfile.UpdateEnforceComputerNameConvention(Model.DeviceProfile.Id)));
@@ -757,8 +816,7 @@ WriteLiteral(@"', data, function (response, result) {
</td>
</tr>
<tr>
<th>
Default Organisational Unit:
<th>Default Organisational Unit:
</th>
<td>
");
@@ -876,33 +934,31 @@ WriteLiteral("\', data, function (response, result) {\r\n
#line default
#line hidden
WriteLiteral("\', null, function (data) {\r\n var dynatreeDataT" +
"ransformer = function (element) {\r\n var c" +
"hild = {\r\n title: element.Name,\r\n " +
" key: element.Path,\r\n " +
" isFolder: true\r\n " +
"}\r\n if (element.Children) {\r\n " +
" child.children = [];\r\n " +
" for (var i = 0; i < element.Children.length; i++) {\r\n " +
" child.children.push(dynatreeDataTransform" +
"er(element.Children[i]));\r\n }\r\n " +
" }\r\n ret" +
"urn child;\r\n };\r\n " +
" var dynatreeData = [];\r\n for (var i =" +
" 0; i < data.length; i++) {\r\n dynatreeDat" +
"a.push(dynatreeDataTransformer(data[i]));\r\n }" +
"\r\n\r\n ouTree.dynatree({\r\n " +
WriteLiteral("\', null, function (data) {\r\n var dynatreeDataTrans" +
"former = function (element) {\r\n var child = {" +
"\r\n title: element.Name,\r\n " +
" key: element.Path,\r\n " +
" isFolder: true\r\n }\r\n " +
" if (element.Children) {\r\n " +
"child.children = [];\r\n for (var i = 0; i " +
"< element.Children.length; i++) {\r\n c" +
"hild.children.push(dynatreeDataTransformer(element.Children[i]));\r\n " +
" }\r\n }\r\n " +
" return child;\r\n };\r\n " +
" var dynatreeData = [];\r\n " +
" for (var i = 0; i < data.length; i++) {\r\n " +
" dynatreeData.push(dynatreeDataTransformer(data[i]));\r\n " +
" }\r\n\r\n ouTree.dynatree({\r\n " +
" children: dynatreeData,\r\n " +
" onActivate: function (node) {\r\n /" +
"/alert(\'node selected: \' + node.data.key);\r\n " +
" }\r\n });\r\n " +
" ouTreeLoaded = true;\r\n ouUpdateTree();\r\n " +
" });\r\n } else {\r\n " +
" ouUpdateTree();\r\n }\r\n " +
" ouDialog.dialog(\'open\');\r\n };\r\n\r\n " +
" ouChangeLink.click(ouChange);\r\n upd" +
"ateDisplayOrganisationalUnit();\r\n });\r\n </scri" +
"pt>\r\n <div");
"onActivate: function (node) {\r\n //alert(\'" +
"node selected: \' + node.data.key);\r\n }\r\n " +
" });\r\n ouTreeLoaded = t" +
"rue;\r\n ouUpdateTree();\r\n " +
" });\r\n } else {\r\n ouUpdateTr" +
"ee();\r\n }\r\n ouDialog.dialog(\'o" +
"pen\');\r\n };\r\n\r\n ouChangeLink.click" +
"(ouChange);\r\n updateDisplayOrganisationalUnit();\r\n " +
" });\r\n </script>\r\n <div");
WriteLiteral(" style=\"margin-top: 8px;\"");
@@ -985,7 +1041,7 @@ WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
WriteLiteral(" style=\"float: left; margin: 0 7px 20px 0;\"");
WriteLiteral("></span>\r\n This item will be permanently deleted and cannot be recovered. " +
"Are you sure?</p>\r\n</div>\r\n<script");
"Are you sure?\r\n </p>\r\n</div>\r\n<script");
WriteLiteral(" type=\"text/javascript\"");
@@ -1024,13 +1080,13 @@ WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n");
#line 531 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 532 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line default
#line hidden
#line 531 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 532 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
if (Model.CanDelete)
{
@@ -1038,14 +1094,14 @@ WriteLiteral(">\r\n");
#line default
#line hidden
#line 533 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 534 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Html.ActionLinkButton("Delete", MVC.API.DeviceProfile.Delete(Model.DeviceProfile.Id, true), "buttonDelete"));
#line default
#line hidden
#line 533 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 534 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
}
@@ -1055,7 +1111,18 @@ WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 535 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line 536 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Html.ActionLinkButton("Export Devices", MVC.API.DeviceProfile.ExportDevices(Model.DeviceProfile.Id)));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 537 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceProfile.Id.ToString(), "DeviceProfile")));
@@ -30,8 +30,8 @@
@item.DeviceCount.ToString("n0")
@if (item.DeviceDecommissionedCount > 0)
{
<span class="smallMessage" title="@(item.DeviceDecommissionedCount) Decommissioned">
(@(item.DeviceDecommissionedCount))</span>
<span class="smallMessage" title="@(item.DeviceDecommissionedCount.ToString("n0")) Decommissioned">
(@(item.DeviceDecommissionedCount.ToString("n0")))</span>
}
</td>
</tr>
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18033
// Runtime Version:4.0.30319.18051
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -140,22 +140,22 @@ WriteLiteral(" <span");
WriteLiteral(" class=\"smallMessage\"");
WriteAttribute("title", Tuple.Create(" title=\"", 996), Tuple.Create("\"", 1052)
WriteAttribute("title", Tuple.Create(" title=\"", 996), Tuple.Create("\"", 1067)
#line 33 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
, Tuple.Create(Tuple.Create("", 1004), Tuple.Create<System.Object, System.Int32>(item.DeviceDecommissionedCount
, Tuple.Create(Tuple.Create("", 1004), Tuple.Create<System.Object, System.Int32>(item.DeviceDecommissionedCount.ToString("n0")
#line default
#line hidden
, 1004), false)
, Tuple.Create(Tuple.Create(" ", 1037), Tuple.Create("Decommissioned", 1038), true)
, Tuple.Create(Tuple.Create(" ", 1052), Tuple.Create("Decommissioned", 1053), true)
);
WriteLiteral(">\r\n (");
#line 34 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
Write(item.DeviceDecommissionedCount);
Write(item.DeviceDecommissionedCount.ToString("n0"));
#line default