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
@@ -10,6 +10,9 @@ namespace Disco.Models.UI.Config.DeviceBatch
{ {
Disco.Models.Repository.DeviceBatch DeviceBatch { get; set; } Disco.Models.Repository.DeviceBatch DeviceBatch { get; set; }
List<Disco.Models.Repository.DeviceModel> DeviceModels { get; set; } List<Disco.Models.Repository.DeviceModel> DeviceModels { get; set; }
List<ConfigDeviceBatchShowModelMembership> DeviceModelMembers { get; set; }
int DeviceCount { get; set; } int DeviceCount { get; set; }
int DeviceDecommissionedCount { get; set; } int DeviceDecommissionedCount { get; set; }
bool CanDelete { get; set; } bool CanDelete { get; set; }
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Disco.Models.UI.Config.DeviceBatch
{
public interface ConfigDeviceBatchShowModelMembership : BaseUIModel
{
Disco.Models.Repository.DeviceModel DeviceModel { get; set; }
int DeviceCount { get; set; }
int DeviceDecommissionedCount { get; set; }
}
}
@@ -14,5 +14,6 @@ namespace Disco.Models.UI.Config.DeviceModel
string Model { get; set; } string Model { get; set; }
string ModelType { get; set; } string ModelType { get; set; }
int DeviceCount { get; set; } int DeviceCount { get; set; }
int DeviceDecommissionedCount { get; set; }
} }
} }
@@ -12,6 +12,9 @@ namespace Disco.Models.UI.Config.DeviceModel
ConfigDeviceModelComponentsModel DeviceComponentsModel { get; set; } ConfigDeviceModelComponentsModel DeviceComponentsModel { get; set; }
int DeviceCount { get; set; }
int DeviceDecommissionedCount { get; set; }
bool CanDelete { get; set; } bool CanDelete { get; set; }
} }
} }
@@ -11,6 +11,9 @@ namespace Disco.Models.UI.Config.DeviceProfile
Disco.Models.Repository.DeviceProfile DeviceProfile { get; set; } Disco.Models.Repository.DeviceProfile DeviceProfile { get; set; }
List<Disco.Models.BI.Config.OrganisationAddress> OrganisationAddresses { get; set; } List<Disco.Models.BI.Config.OrganisationAddress> OrganisationAddresses { get; set; }
int DeviceCount { get; set; }
int DeviceDecommissionedCount { get; set; }
bool CanDelete { get; set; } bool CanDelete { get; set; }
} }
} }
@@ -20,18 +20,25 @@ namespace Disco.Web.Areas.Config.Controllers
if (id.HasValue) if (id.HasValue)
{ {
var m = new Models.DeviceBatch.ShowModel() var m = dbContext.DeviceBatches.Where(db => db.Id == id.Value)
{ .Select(db => new Models.DeviceBatch.ShowModel()
DeviceBatch = dbContext.DeviceBatches.Find(id) {
}; DeviceBatch = db,
if (m.DeviceBatch == null) DeviceCount = db.Devices.Count(),
{ DeviceDecommissionedCount = db.Devices.Count(d => d.DecommissionedDate.HasValue)
return RedirectToAction(MVC.Config.DeviceBatch.Index(null)); }).FirstOrDefault();
}
m.CanDelete = m.DeviceBatch.CanDelete(dbContext);
m.DeviceCount = m.DeviceBatch.Devices.Count(); if (m == null || m.DeviceBatch == null)
m.DeviceDecommissionedCount = m.DeviceBatch.Devices.Count(d => d.DecommissionedDate.HasValue); 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(); m.DeviceModels = dbContext.DeviceModels.ToList();
@@ -17,16 +17,22 @@ namespace Disco.Web.Areas.Config.Controllers
{ {
if (id.HasValue) 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(), DeviceModel = dm,
WarrantyProviders = Plugins.GetPluginFeatures(typeof(WarrantyProviderFeature)) 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() m.DeviceComponentsModel = new Models.DeviceModel.ComponentsModel()
{ {
DeviceModelId = m.DeviceModel.Id, 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() 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) 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), DeviceProfile = dp,
OrganisationAddresses = dbContext.DiscoConfiguration.OrganisationAddresses.Addresses, DeviceCount = dp.Devices.Count(),
CertificateProviders = Plugins.GetPluginFeatures(typeof(CertificateProviderFeature)) 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)); var DistributionValues = Enum.GetValues(typeof(Disco.Models.Repository.DeviceProfile.DistributionTypes));
m.DeviceProfileDistributionTypes = new List<SelectListItem>(); 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 Disco.Models.Repository.DeviceBatch DeviceBatch { get; set; }
public List<Disco.Models.Repository.DeviceModel> DeviceModels { get; set; } public List<Disco.Models.Repository.DeviceModel> DeviceModels { get; set; }
public List<ConfigDeviceBatchShowModelMembership> DeviceModelMembers { get; set; }
public int DeviceCount { get; set; } public int DeviceCount { get; set; }
public int DeviceDecommissionedCount { get; set; } public int DeviceDecommissionedCount { get; set; }
public bool CanDelete { 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, Manufacturer = dm.Manufacturer,
Model = dm.Model, Model = dm.Model,
ModelType = dm.ModelType, ModelType = dm.ModelType,
DeviceCount = dm.Devices.Count DeviceCount = dm.Devices.Count,
DeviceDecommissionedCount = dm.Devices.Count(d => d.DecommissionedDate.HasValue)
}).ToArray().Cast<ConfigDeviceModelIndexModelItem>().ToList(); }).ToArray().Cast<ConfigDeviceModelIndexModelItem>().ToList();
return m; return m;
@@ -15,6 +15,9 @@ namespace Disco.Web.Areas.Config.Models.DeviceModel
public List<PluginFeatureManifest> WarrantyProviders { get; set; } public List<PluginFeatureManifest> WarrantyProviders { get; set; }
public int DeviceCount { get; set; }
public int DeviceDecommissionedCount { get; set; }
public bool CanDelete { 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 Model { get; set; }
public string ModelType { get; set; } public string ModelType { get; set; }
public int DeviceCount { get; set; } public int DeviceCount { get; set; }
public int DeviceDecommissionedCount { get; set; }
public override string ToString() public override string ToString()
{ {
@@ -16,6 +16,9 @@ namespace Disco.Web.Areas.Config.Models.DeviceProfile
public List<PluginFeatureManifest> CertificateProviders { get; set; } public List<PluginFeatureManifest> CertificateProviders { get; set; }
public int DeviceCount { get; set; }
public int DeviceDecommissionedCount { get; set; }
public bool CanDelete { get; set; } public bool CanDelete { get; set; }
} }
} }
@@ -53,8 +53,8 @@
} }
@if (item.DeviceDecommissionedCount > 0) @if (item.DeviceDecommissionedCount > 0)
{ {
<span class="smallMessage" title="@(item.DeviceDecommissionedCount) Decommissioned"> <span class="smallMessage" title="@(item.DeviceDecommissionedCount.ToString("n0")) Decommissioned">
(@(item.DeviceDecommissionedCount))</span> (@(item.DeviceDecommissionedCount.ToString("n0")))</span>
} }
</td> </td>
</tr> </tr>
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // 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 // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@@ -229,22 +229,22 @@ WriteLiteral(" <span");
WriteLiteral(" class=\"smallMessage\""); 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" #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 default
#line hidden #line hidden
, 1783), false) , 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 ("); WriteLiteral(">\r\n (");
#line 57 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml" #line 57 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(item.DeviceDecommissionedCount); Write(item.DeviceDecommissionedCount.ToString("n0"));
#line default #line default
@@ -8,16 +8,14 @@
<div class="form deviceBatches" style="width: 730px"> <div class="form deviceBatches" style="width: 730px">
<table> <table>
<tr> <tr>
<th style="width: 150px"> <th style="width: 150px">Id:
Id:
</th> </th>
<td> <td>
@Html.DisplayFor(model => model.DeviceBatch.Id) @Html.DisplayFor(model => model.DeviceBatch.Id)
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Name:
Name:
</th> </th>
<td>@Html.EditorFor(model => model.DeviceBatch.Name) <td>@Html.EditorFor(model => model.DeviceBatch.Name)
@AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxSave()
@@ -35,35 +33,86 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Default Device Model:
Device Count:
</th> </th>
<td> <td>
@if (Model.DeviceBatch.UnitQuantity.HasValue) @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)
{ {
<span>@Model.DeviceCount of @(Model.DeviceBatch.UnitQuantity.Value)</span> <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 else
{ {
@Model.DeviceCount <div class="smallMessage">No device models are referenced in this batch.</div>
} }
managed by Disco @if (Model.DeviceBatch.UnitQuantity.HasValue && Model.DeviceBatch.UnitQuantity.Value > Model.DeviceCount)
@if (Model.DeviceDecommissionedCount > 0)
{ {
<span class="smallMessage">(@(Model.DeviceDecommissionedCount) var missingCount = Model.DeviceBatch.UnitQuantity.Value - Model.DeviceCount;
Decommissioned)</span> <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> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Purchase:
Purchase:
</th> </th>
<td class="details"> <td class="details">
<table class="sub"> <table class="sub">
<tr> <tr>
<th class="name" style="width: 100px"> <th class="name" style="width: 100px">Purchase Date:
Purchase Date:
</th> </th>
<td> <td>
@Html.EditorFor(model => model.DeviceBatch.PurchaseDate) @Html.EditorFor(model => model.DeviceBatch.PurchaseDate)
@@ -84,8 +133,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Supplier:
Supplier:
</th> </th>
<td> <td>
@Html.EditorFor(model => model.DeviceBatch.Supplier) @Html.EditorFor(model => model.DeviceBatch.Supplier)
@@ -104,8 +152,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Unit Cost:
Unit Cost:
</th> </th>
<td> <td>
@Html.EditorFor(model => model.DeviceBatch.UnitCost) @Html.EditorFor(model => model.DeviceBatch.UnitCost)
@@ -124,8 +171,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Quantity:
Quantity:
</th> </th>
<td> <td>
@Html.EditorFor(model => model.DeviceBatch.UnitQuantity) @Html.EditorFor(model => model.DeviceBatch.UnitQuantity)
@@ -201,37 +247,12 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Warranty:
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> </th>
<td class="details"> <td class="details">
<table class="sub"> <table class="sub">
<tr> <tr>
<th class="name" style="width: 100px"> <th class="name" style="width: 100px">Valid Until:
Valid Until:
</th> </th>
<td> <td>
@Html.EditorFor(model => model.DeviceBatch.WarrantyValidUntil) @Html.EditorFor(model => model.DeviceBatch.WarrantyValidUntil)
@@ -309,14 +330,12 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Insurance:
Insurance:
</th> </th>
<td class="details"> <td class="details">
<table class="sub"> <table class="sub">
<tr> <tr>
<th class="name" style="width: 100px"> <th class="name" style="width: 100px">Supplier:
Supplier:
</th> </th>
<td> <td>
@Html.EditorFor(model => model.DeviceBatch.InsuranceSupplier) @Html.EditorFor(model => model.DeviceBatch.InsuranceSupplier)
@@ -335,8 +354,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th class="name"> <th class="name">Insured Date:
Insured Date:
</th> </th>
<td> <td>
@Html.EditorFor(model => model.DeviceBatch.InsuredDate) @Html.EditorFor(model => model.DeviceBatch.InsuredDate)
@@ -357,8 +375,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th class="name"> <th class="name">Insured Until:
Insured Until:
</th> </th>
<td> <td>
@Html.EditorFor(model => model.DeviceBatch.InsuredUntil) @Html.EditorFor(model => model.DeviceBatch.InsuredUntil)
@@ -435,8 +452,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Comments:<br />
Comments:<br />
@AjaxHelpers.AjaxLoader("ajaxComments") @AjaxHelpers.AjaxLoader("ajaxComments")
</th> </th>
<td> <td>
@@ -499,6 +515,7 @@
} }
@if (Model.DeviceCount > 0) @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")) @Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceBatch.Id.ToString(), "DeviceBatch"))
} }
</div> </div>
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // 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 // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@@ -61,22 +61,22 @@ WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th");
WriteLiteral(" style=\"width: 150px\""); 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(" "); WriteLiteral(" ");
#line 15 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 14 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.DisplayFor(model => model.DeviceBatch.Id)); Write(Html.DisplayFor(model => model.DeviceBatch.Id));
#line default #line default
#line hidden #line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " + WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>Name:\r\n " +
" Name:\r\n </th>\r\n <td>"); " </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)); Write(Html.EditorFor(model => model.DeviceBatch.Name));
@@ -87,7 +87,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 23 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 21 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxSave()); Write(AjaxHelpers.AjaxSave());
@@ -98,7 +98,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 24 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 22 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader()); Write(AjaxHelpers.AjaxLoader());
@@ -113,62 +113,196 @@ WriteLiteral(">\r\n $(function () {\r\n
",\r\n \'Invalid Name\',\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))); Write(Url.Action(MVC.API.DeviceBatch.UpdateName(Model.DeviceBatch.Id)));
#line default #line default
#line hidden #line hidden
WriteLiteral(@"', WriteLiteral("\',\r\n \'BatchName\'\r\n );\r\n " +
'BatchName' " });\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");
</script>
</td> WriteLiteral(" ");
</tr>
<tr>
<th>
Device Count:
</th>
<td>
");
#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 default
#line hidden #line hidden
#line 42 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 60 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
if (Model.DeviceBatch.UnitQuantity.HasValue) if (Model.DeviceModelMembers.Count > 0)
{ {
#line default #line default
#line hidden #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" #line 71 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Model.DeviceCount);
#line default #line default
#line hidden #line hidden
WriteLiteral(" of ");
#line 71 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line 44 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" foreach (var membership in Model.DeviceModelMembers.OrderByDescending(dmm => dmm.DeviceCount))
Write(Model.DeviceBatch.UnitQuantity.Value); {
#line default #line default
#line hidden #line hidden
WriteLiteral("</span>\r\n"); WriteLiteral(" <tr>\r\n <td>\r\n");
WriteLiteral(" ");
#line 45 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #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 else
{ {
@@ -176,61 +310,91 @@ WriteLiteral("</span>\r\n");
#line default #line default
#line hidden #line hidden
WriteLiteral(" <div");
#line 48 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Model.DeviceCount);
#line default
#line hidden
#line 48 "..\..\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(" class=\"smallMessage\"");
WriteLiteral(">("); WriteLiteral(">No device models are referenced in this batch.</div>\r\n");
#line 53 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 98 "..\..\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 default
#line hidden #line hidden
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " + WriteLiteral(" ");
" Purchase:\r\n </th>\r\n <td");
#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
#line hidden
WriteLiteral(" of ");
#line 104 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Model.DeviceBatch.UnitQuantity.Value.ToString("n0"));
#line default
#line hidden
WriteLiteral(" purchased devices are managed by Disco. <strong>");
#line 104 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(missingCount.ToString("n0"));
#line default
#line hidden
WriteLiteral(" ");
#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(" </td>\r\n </tr>\r\n <tr>\r\n <th>Purchase:\r\n " +
" </th>\r\n <td");
WriteLiteral(" class=\"details\""); WriteLiteral(" class=\"details\"");
@@ -244,13 +408,12 @@ WriteLiteral(" class=\"name\"");
WriteLiteral(" style=\"width: 100px\""); WriteLiteral(" style=\"width: 100px\"");
WriteLiteral(">\r\n Purchase Date:\r\n </th>\r\n " + WriteLiteral(">Purchase Date:\r\n </th>\r\n <td>\r\n");
" <td>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 69 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 118 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.PurchaseDate)); Write(Html.EditorFor(model => model.DeviceBatch.PurchaseDate));
@@ -261,7 +424,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 70 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 119 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader()); 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))); Write(Url.Action(MVC.API.DeviceBatch.UpdatePurchaseDate(Model.DeviceBatch.Id)));
@@ -293,8 +456,7 @@ WriteLiteral(@"',
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Supplier:
Supplier:
</th> </th>
<td> <td>
"); ");
@@ -302,7 +464,7 @@ WriteLiteral(@"',
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)); Write(Html.EditorFor(model => model.DeviceBatch.Supplier));
@@ -313,7 +475,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 92 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 140 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxSave()); Write(AjaxHelpers.AjaxSave());
@@ -324,7 +486,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 93 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 141 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader()); 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))); Write(Url.Action(MVC.API.DeviceBatch.UpdateSupplier(Model.DeviceBatch.Id)));
@@ -356,8 +518,7 @@ WriteLiteral(@"',
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Unit Cost:
Unit Cost:
</th> </th>
<td> <td>
"); ");
@@ -365,7 +526,7 @@ WriteLiteral(@"',
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)); Write(Html.EditorFor(model => model.DeviceBatch.UnitCost));
@@ -376,7 +537,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 112 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 159 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxSave()); Write(AjaxHelpers.AjaxSave());
@@ -387,7 +548,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 113 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 160 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader()); 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))); Write(Url.Action(MVC.API.DeviceBatch.UpdateUnitCost(Model.DeviceBatch.Id)));
@@ -419,8 +580,7 @@ WriteLiteral(@"',
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Quantity:
Quantity:
</th> </th>
<td> <td>
"); ");
@@ -428,7 +588,7 @@ WriteLiteral(@"',
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)); Write(Html.EditorFor(model => model.DeviceBatch.UnitQuantity));
@@ -439,7 +599,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 132 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 178 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxSave()); Write(AjaxHelpers.AjaxSave());
@@ -450,7 +610,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 133 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 179 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader()); 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))); 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 "); 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")); Write(AjaxHelpers.AjaxLoader("ajaxPurchaseDetails"));
@@ -500,7 +660,7 @@ WriteLiteral("\r\n </div>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 151 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 197 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.PurchaseDetails)); Write(Html.EditorFor(model => model.DeviceBatch.PurchaseDetails));
@@ -529,7 +689,7 @@ WriteLiteral(@">
url: '"); 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))); 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 " + " $(ed.getWin()).blur(model.updated);\r\n " +
" });\r\n }\r\n " + " });\r\n }\r\n " +
" });\r\n });\r\n </script>\r\n " + " });\r\n });\r\n </script>\r\n " +
" </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n" + " </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>Wa" +
" Default Device Model:\r\n </th>\r\n <td>\r\n"); "rranty:\r\n </th>\r\n <td");
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");
WriteLiteral(" class=\"details\""); WriteLiteral(" class=\"details\"");
@@ -635,13 +732,12 @@ WriteLiteral(" class=\"name\"");
WriteLiteral(" style=\"width: 100px\""); WriteLiteral(" style=\"width: 100px\"");
WriteLiteral(">\r\n Valid Until:\r\n </th>\r\n " + WriteLiteral(">Valid Until:\r\n </th>\r\n <td>\r\n");
" <td>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 237 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 258 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.WarrantyValidUntil)); Write(Html.EditorFor(model => model.DeviceBatch.WarrantyValidUntil));
@@ -652,7 +748,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 238 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 259 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader()); 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))); 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 "); 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")); Write(AjaxHelpers.AjaxLoader("ajaxWarrantyDetails"));
@@ -702,7 +798,7 @@ WriteLiteral("\r\n </div>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 259 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 280 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.WarrantyDetails)); Write(Html.EditorFor(model => model.DeviceBatch.WarrantyDetails));
@@ -731,7 +827,7 @@ WriteLiteral(@">
url: '"); 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))); 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 " + " $(ed.getWin()).blur(model.updated);\r\n " +
" });\r\n }\r\n " + " });\r\n }\r\n " +
" });\r\n });\r\n </script>\r\n " + " });\r\n });\r\n </script>\r\n " +
" </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n" + " </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>In" +
" Insurance:\r\n </th>\r\n <td"); "surance:\r\n </th>\r\n <td");
WriteLiteral(" class=\"details\""); WriteLiteral(" class=\"details\"");
@@ -774,13 +870,12 @@ WriteLiteral(" class=\"name\"");
WriteLiteral(" style=\"width: 100px\""); WriteLiteral(" style=\"width: 100px\"");
WriteLiteral(">\r\n Supplier:\r\n </th>\r\n " + WriteLiteral(">Supplier:\r\n </th>\r\n <td>\r\n");
" <td>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 322 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 341 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.InsuranceSupplier)); Write(Html.EditorFor(model => model.DeviceBatch.InsuranceSupplier));
@@ -791,7 +886,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 323 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 342 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxSave()); Write(AjaxHelpers.AjaxSave());
@@ -802,7 +897,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 324 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 343 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader()); 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))); Write(Url.Action(MVC.API.DeviceBatch.UpdateInsuranceSupplier(Model.DeviceBatch.Id)));
@@ -838,13 +933,12 @@ WriteLiteral(@"',
WriteLiteral(" class=\"name\""); WriteLiteral(" class=\"name\"");
WriteLiteral(">\r\n Insured Date:\r\n </th>\r\n " + WriteLiteral(">Insured Date:\r\n </th>\r\n <td>\r\n");
" <td>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 342 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 360 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.InsuredDate)); Write(Html.EditorFor(model => model.DeviceBatch.InsuredDate));
@@ -855,7 +949,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 343 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 361 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader()); 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))); Write(Url.Action(MVC.API.DeviceBatch.UpdateInsuredDate(Model.DeviceBatch.Id)));
@@ -891,13 +985,12 @@ WriteLiteral(@"',
WriteLiteral(" class=\"name\""); WriteLiteral(" class=\"name\"");
WriteLiteral(">\r\n Insured Until:\r\n </th>\r\n " + WriteLiteral(">Insured Until:\r\n </th>\r\n <td>\r\n");
" <td>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 364 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 381 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.InsuredUntil)); Write(Html.EditorFor(model => model.DeviceBatch.InsuredUntil));
@@ -908,7 +1001,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 365 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 382 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader()); 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))); 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 "); 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")); Write(AjaxHelpers.AjaxLoader("ajaxInsuranceDetails"));
@@ -958,7 +1051,7 @@ WriteLiteral("\r\n </div>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 386 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 403 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.InsuranceDetails)); Write(Html.EditorFor(model => model.DeviceBatch.InsuranceDetails));
@@ -985,7 +1078,7 @@ WriteLiteral(@">
url: '"); 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))); 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 " +
" });\r\n });\r\n </scr" + " });\r\n });\r\n </scr" +
"ipt>\r\n </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n " + "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(" "); WriteLiteral(" ");
#line 440 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 456 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(AjaxHelpers.AjaxLoader("ajaxComments")); Write(AjaxHelpers.AjaxLoader("ajaxComments"));
@@ -1031,7 +1124,7 @@ WriteLiteral("\r\n </th>\r\n <td>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 443 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 459 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.Comments)); Write(Html.EditorFor(model => model.DeviceBatch.Comments));
@@ -1058,7 +1151,7 @@ WriteLiteral(@">
url: '"); 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))); Write(Url.Action(MVC.API.DeviceBatch.UpdateComments(Model.DeviceBatch.Id)));
@@ -1093,13 +1186,13 @@ WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n"); WriteLiteral(">\r\n");
#line 496 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 512 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line default #line default
#line hidden #line hidden
#line 496 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 512 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
if (Model.CanDelete) if (Model.CanDelete)
{ {
@@ -1107,14 +1200,14 @@ WriteLiteral(">\r\n");
#line default #line default
#line hidden #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")); Write(Html.ActionLinkButton("Delete", MVC.API.DeviceBatch.Delete(Model.DeviceBatch.Id, true), "buttonDelete"));
#line default #line default
#line hidden #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(" "); WriteLiteral(" ");
#line 500 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 516 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
if (Model.DeviceCount > 0) if (Model.DeviceCount > 0)
{ {
@@ -1132,14 +1225,28 @@ WriteLiteral(" ");
#line default #line default
#line hidden #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"))); Write(Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceBatch.Id.ToString(), "DeviceBatch")));
#line default #line default
#line hidden #line hidden
#line 502 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 519 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
} }
@@ -37,6 +37,11 @@
</td> </td>
<td> <td>
@item.DeviceCount.ToString("n0") @item.DeviceCount.ToString("n0")
@if (item.DeviceDecommissionedCount > 0)
{
<span class="smallMessage" title="@(item.DeviceDecommissionedCount) Decommissioned">
(@(item.DeviceDecommissionedCount.ToString("n0")))</span>
}
</td> </td>
</tr> </tr>
} }
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // 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 // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@@ -141,10 +141,59 @@ WriteLiteral(" ");
#line default #line default
#line hidden #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" #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(" "); 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())); Write(Html.ActionLinkButton("Generic Components", MVC.Config.DeviceModel.GenericComponents()));
@@ -37,6 +37,16 @@
@Html.DisplayFor(model => model.DeviceModel.Model) @Html.DisplayFor(model => model.DeviceModel.Model)
</td> </td>
</tr> </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> <tr>
<th> <th>
Default Purchase Date: Default Purchase Date:
@@ -201,5 +211,6 @@
{ {
@Html.ActionLinkButton("Delete", MVC.API.DeviceModel.Delete(Model.DeviceModel.Id, true), "buttonDelete") @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")) @Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceModel.Id.ToString(), "DeviceModel"))
</div> </div>
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // 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 // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@@ -125,13 +125,79 @@ WriteLiteral(" ");
#line default #line default
#line hidden #line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " + WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>Statistics</th>" +
" Default Purchase Date:\r\n </th>\r\n <td>\r\n"); "\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(" "); WriteLiteral(" ");
#line 45 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml" #line 55 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceModel.DefaultPurchaseDate)); Write(Html.EditorFor(model => model.DeviceModel.DefaultPurchaseDate));
@@ -142,7 +208,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 46 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml" #line 56 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(AjaxHelpers.AjaxLoader()); Write(AjaxHelpers.AjaxLoader());
@@ -154,7 +220,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n
WriteLiteral(" "); 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"))); Write(Html.DropDownListFor(model => model.DeviceModel.DefaultWarrantyProvider, Model.WarrantyProviders.ToSelectListItems(Model.DeviceModel.DefaultWarrantyProvider, true, "None")));
@@ -165,7 +231,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 55 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml" #line 65 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(AjaxHelpers.AjaxLoader()); Write(AjaxHelpers.AjaxLoader());
@@ -177,7 +243,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n
WriteLiteral(" "); WriteLiteral(" ");
#line 63 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml" #line 73 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.DisplayFor(model => model.DeviceModel.ModelType)); 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\""); 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" #line 81 "..\..\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())) , 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 default
#line hidden #line hidden
, 2157), false) , 2696), false)
); );
WriteLiteral(" />\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " + 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"); "\r\n <td>\r\n");
#line 81 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml" #line 91 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line default #line default
#line hidden #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" })) 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"); 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: '"); 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))); Write(Url.Action(MVC.API.DeviceModel.UpdateDescription(Model.DeviceModel.Id)));
@@ -331,7 +397,7 @@ WriteLiteral(@">
$.getJSON('"); $.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))); Write(Url.Action(MVC.API.DeviceModel.UpdateDefaultPurchaseDate(Model.DeviceModel.Id)));
@@ -369,7 +435,7 @@ WriteLiteral(@">
url: '"); 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))); 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)); Write(Html.Partial(MVC.Config.DeviceModel.Views._DeviceComponentsTable, Model.DeviceComponentsModel));
@@ -413,13 +479,13 @@ WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n"); WriteLiteral(">\r\n");
#line 200 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml" #line 210 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line default #line default
#line hidden #line hidden
#line 200 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml" #line 210 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
if (Model.CanDelete) if (Model.CanDelete)
{ {
@@ -427,14 +493,14 @@ WriteLiteral(">\r\n");
#line default #line default
#line hidden #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")); Write(Html.ActionLinkButton("Delete", MVC.API.DeviceModel.Delete(Model.DeviceModel.Id, true), "buttonDelete"));
#line default #line default
#line hidden #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(" "); 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"))); 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"> <div id="configurationDeviceProfileShow" class="form" style="width: 600px">
<table> <table>
<tr> <tr>
<th> <th>Id:
Id:
</th> </th>
<td> <td>
@Html.DisplayFor(model => model.DeviceProfile.Id) @Html.DisplayFor(model => model.DeviceProfile.Id)
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Name:
Name:
</th> </th>
<td>@Html.TextBoxFor(model => model.DeviceProfile.Name) <td>@Html.TextBoxFor(model => model.DeviceProfile.Name)
@AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxSave()
@@ -63,8 +61,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Short Name:
Short Name:
</th> </th>
<td>@Html.TextBoxFor(model => model.DeviceProfile.ShortName) <td>@Html.TextBoxFor(model => model.DeviceProfile.ShortName)
@AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxSave()
@@ -111,8 +108,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Description:
Description:
</th> </th>
<td>@Html.TextBoxFor(model => model.DeviceProfile.Description) <td>@Html.TextBoxFor(model => model.DeviceProfile.Description)
@AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxSave()
@@ -159,8 +155,17 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Members</th>
Distribution Type: <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> </th>
<td> <td>
@Html.DropDownList("DeviceProfile_DistributionType", Model.DeviceProfileDistributionTypes) @Html.DropDownList("DeviceProfile_DistributionType", Model.DeviceProfileDistributionTypes)
@@ -185,8 +190,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Address:
Address:
</th> </th>
<td> <td>
@Html.DropDownListFor(m => m.DeviceProfile.DefaultOrganisationAddress, Model.OrganisationAddresses.ToSelectListItems(Model.DeviceProfile.DefaultOrganisationAddress, true, "None")) @Html.DropDownListFor(m => m.DeviceProfile.DefaultOrganisationAddress, Model.OrganisationAddresses.ToSelectListItems(Model.DeviceProfile.DefaultOrganisationAddress, true, "None"))
@@ -211,8 +215,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Allocate Certificates:
Allocate Certificates:
</th> </th>
<td> <td>
@Html.DropDownListFor(model => model.DeviceProfile.CertificateProviderId, Model.CertificateProviders.ToSelectListItems(null, true, "Not Allocated")) @Html.DropDownListFor(model => model.DeviceProfile.CertificateProviderId, Model.CertificateProviders.ToSelectListItems(null, true, "Not Allocated"))
@@ -248,14 +251,12 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Computer Name Template Expression:
Computer Name Template Expression:
</th> </th>
<td>@Html.TextBoxFor(model => model.DeviceProfile.ComputerNameTemplate) <td>@Html.TextBoxFor(model => model.DeviceProfile.ComputerNameTemplate)
@AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader() @AjaxHelpers.AjaxLoader()
<a id="expressionBrowserAnchor" href="@(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser()))"> <a id="expressionBrowserAnchor" href="@(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser()))">&nbsp;</a>
&nbsp;</a>
<script type="text/javascript"> <script type="text/javascript">
$(function () { $(function () {
var $ComputerNameTemplate = $('#DeviceProfile_ComputerNameTemplate'); var $ComputerNameTemplate = $('#DeviceProfile_ComputerNameTemplate');
@@ -345,8 +346,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Default Organisational Unit:
Default Organisational Unit:
</th> </th>
<td> <td>
@Html.HiddenFor(model => model.DeviceProfile.OrganisationalUnit) @Html.HiddenFor(model => model.DeviceProfile.OrganisationalUnit)
@@ -428,37 +428,37 @@
var ouChange = function () { var ouChange = function () {
if (!ouTreeLoaded) { if (!ouTreeLoaded) {
$.getJSON('@(Url.Action(MVC.API.DeviceProfile.OrganisationalUnits()))', null, function (data) { $.getJSON('@(Url.Action(MVC.API.DeviceProfile.OrganisationalUnits()))', null, function (data) {
var dynatreeDataTransformer = function (element) { var dynatreeDataTransformer = function (element) {
var child = { var child = {
title: element.Name, title: element.Name,
key: element.Path, key: element.Path,
isFolder: true 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]));
} }
if (element.Children) {
ouTree.dynatree({ child.children = [];
children: dynatreeData, for (var i = 0; i < element.Children.length; i++) {
onActivate: function (node) { child.children.push(dynatreeDataTransformer(element.Children[i]));
//alert('node selected: ' + node.data.key);
} }
}); }
ouTreeLoaded = true; return child;
ouUpdateTree(); };
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(); ouUpdateTree();
} });
} else {
ouUpdateTree();
}
ouDialog.dialog('open'); ouDialog.dialog('open');
}; };
@@ -497,7 +497,8 @@
<div id="dialogConfirmDelete" title="Delete this Device Profile?"> <div id="dialogConfirmDelete" title="Delete this Device Profile?">
<p> <p>
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span> <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> </div>
<script type="text/javascript"> <script type="text/javascript">
$(function () { $(function () {
@@ -532,5 +533,6 @@
{ {
@Html.ActionLinkButton("Delete", MVC.API.DeviceProfile.Delete(Model.DeviceProfile.Id, true), "buttonDelete") @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")) @Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceProfile.Id.ToString(), "DeviceProfile"))
</div> </div>
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // 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 // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@@ -58,23 +58,23 @@ WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 600px\""); WriteLiteral(" style=\"width: 600px\"");
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n Id:\r\n " + WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>Id:\r\n </th>\r\n " +
"</th>\r\n <td>\r\n"); " <td>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 14 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line 13 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Html.DisplayFor(model => model.DeviceProfile.Id)); Write(Html.DisplayFor(model => model.DeviceProfile.Id));
#line default #line default
#line hidden #line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " + WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>Name:\r\n " +
" Name:\r\n </th>\r\n <td>"); " </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)); Write(Html.TextBoxFor(model => model.DeviceProfile.Name));
@@ -85,7 +85,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 22 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line 20 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxSave()); Write(AjaxHelpers.AjaxSave());
@@ -96,7 +96,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 23 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line 21 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxLoader()); Write(AjaxHelpers.AjaxLoader());
@@ -129,7 +129,7 @@ WriteLiteral(@">
url: '"); 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))); Write(Url.Action(MVC.API.DeviceProfile.UpdateName(Model.DeviceProfile.Id)));
@@ -157,13 +157,12 @@ WriteLiteral(@"',
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Short Name:
Short Name:
</th> </th>
<td>"); <td>");
#line 69 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line 66 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Html.TextBoxFor(model => model.DeviceProfile.ShortName)); Write(Html.TextBoxFor(model => model.DeviceProfile.ShortName));
@@ -174,7 +173,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 70 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line 67 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxSave()); Write(AjaxHelpers.AjaxSave());
@@ -185,7 +184,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 71 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line 68 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxLoader()); Write(AjaxHelpers.AjaxLoader());
@@ -218,7 +217,7 @@ WriteLiteral(@">
url: '"); 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))); Write(Url.Action(MVC.API.DeviceProfile.UpdateShortName(Model.DeviceProfile.Id)));
@@ -246,13 +245,12 @@ WriteLiteral(@"',
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Description:
Description:
</th> </th>
<td>"); <td>");
#line 117 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line 113 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Html.TextBoxFor(model => model.DeviceProfile.Description)); Write(Html.TextBoxFor(model => model.DeviceProfile.Description));
@@ -263,7 +261,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 118 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line 114 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxSave()); Write(AjaxHelpers.AjaxSave());
@@ -274,7 +272,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 119 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line 115 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxLoader()); Write(AjaxHelpers.AjaxLoader());
@@ -307,7 +305,7 @@ WriteLiteral(@">
url: '"); 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))); Write(Url.Action(MVC.API.DeviceProfile.UpdateDescription(Model.DeviceProfile.Id)));
@@ -335,16 +333,80 @@ WriteLiteral(@"',
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Members</th>
Distribution Type:
</th>
<td> <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(" "); WriteLiteral(" ");
#line 166 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line 171 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Html.DropDownList("DeviceProfile_DistributionType", Model.DeviceProfileDistributionTypes)); Write(Html.DropDownList("DeviceProfile_DistributionType", Model.DeviceProfileDistributionTypes));
@@ -355,7 +417,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 167 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line 172 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxLoader()); Write(AjaxHelpers.AjaxLoader());
@@ -374,7 +436,7 @@ WriteLiteral(@">
$.getJSON('"); $.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))); Write(Url.Action(MVC.API.DeviceProfile.UpdateDistributionType(Model.DeviceProfile.Id)));
@@ -394,8 +456,7 @@ WriteLiteral(@"', data, function (response, result) {
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Address:
Address:
</th> </th>
<td> <td>
"); ");
@@ -403,7 +464,7 @@ WriteLiteral(@"', data, function (response, result) {
WriteLiteral(" "); 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"))); Write(Html.DropDownListFor(m => m.DeviceProfile.DefaultOrganisationAddress, Model.OrganisationAddresses.ToSelectListItems(Model.DeviceProfile.DefaultOrganisationAddress, true, "None")));
@@ -414,7 +475,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 193 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line 197 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxLoader()); Write(AjaxHelpers.AjaxLoader());
@@ -433,7 +494,7 @@ WriteLiteral(@">
$.getJSON('"); $.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))); Write(Url.Action(MVC.API.DeviceProfile.UpdateDefaultOrganisationAddress(Model.DeviceProfile.Id)));
@@ -453,8 +514,7 @@ WriteLiteral(@"', data, function (response, result) {
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Allocate Certificates:
Allocate Certificates:
</th> </th>
<td> <td>
"); ");
@@ -462,7 +522,7 @@ WriteLiteral(@"', data, function (response, result) {
WriteLiteral(" "); 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"))); Write(Html.DropDownListFor(model => model.DeviceProfile.CertificateProviderId, Model.CertificateProviders.ToSelectListItems(null, true, "Not Allocated")));
@@ -473,7 +533,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 219 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line 222 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxLoader()); Write(AjaxHelpers.AjaxLoader());
@@ -495,7 +555,7 @@ WriteLiteral(@">
url: '"); 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))); Write(Url.Action(MVC.API.DeviceProfile.UpdateCertificateProviderId(Model.DeviceProfile.Id)));
@@ -523,13 +583,12 @@ WriteLiteral(@"',
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Computer Name Template Expression:
Computer Name Template Expression:
</th> </th>
<td>"); <td>");
#line 254 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line 256 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(Html.TextBoxFor(model => model.DeviceProfile.ComputerNameTemplate)); Write(Html.TextBoxFor(model => model.DeviceProfile.ComputerNameTemplate));
@@ -540,7 +599,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 255 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line 257 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxSave()); Write(AjaxHelpers.AjaxSave());
@@ -551,7 +610,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 256 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line 258 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxLoader()); Write(AjaxHelpers.AjaxLoader());
@@ -561,17 +620,17 @@ WriteLiteral("\r\n <a");
WriteLiteral(" id=\"expressionBrowserAnchor\""); 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" #line 259 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
, Tuple.Create(Tuple.Create("", 13411), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser()) , Tuple.Create(Tuple.Create("", 13817), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser())
#line default #line default
#line hidden #line hidden
, 13411), false) , 13817), false)
); );
WriteLiteral(">\r\n &nbsp;</a>\r\n <script"); WriteLiteral(">&nbsp;</a>\r\n <script");
WriteLiteral(" type=\"text/javascript\""); WriteLiteral(" type=\"text/javascript\"");
@@ -597,7 +656,7 @@ WriteLiteral(@">
url: '"); 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))); Write(Url.Action(MVC.API.DeviceProfile.UpdateComputerNameTemplate(Model.DeviceProfile.Id)));
@@ -640,7 +699,7 @@ WriteLiteral(" type=\"checkbox\"");
WriteLiteral(" "); 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)); Write(Model.DeviceProfile.ProvisionADAccount ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty));
@@ -651,7 +710,7 @@ WriteLiteral("/>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 302 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line 303 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxLoader()); Write(AjaxHelpers.AjaxLoader());
@@ -670,7 +729,7 @@ WriteLiteral(@">
$.getJSON('"); $.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))); Write(Url.Action(MVC.API.DeviceProfile.UpdateProvisionADAccount(Model.DeviceProfile.Id)));
@@ -706,7 +765,7 @@ WriteLiteral(" type=\"checkbox\"");
WriteLiteral(" "); 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)); Write(Model.DeviceProfile.EnforceComputerNameConvention ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty));
@@ -717,7 +776,7 @@ WriteLiteral("/>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 326 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line 327 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
Write(AjaxHelpers.AjaxLoader()); Write(AjaxHelpers.AjaxLoader());
@@ -736,7 +795,7 @@ WriteLiteral(@">
$.getJSON('"); $.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))); Write(Url.Action(MVC.API.DeviceProfile.UpdateEnforceComputerNameConvention(Model.DeviceProfile.Id)));
@@ -757,8 +816,7 @@ WriteLiteral(@"', data, function (response, result) {
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Default Organisational Unit:
Default Organisational Unit:
</th> </th>
<td> <td>
"); ");
@@ -876,33 +934,31 @@ WriteLiteral("\', data, function (response, result) {\r\n
#line default #line default
#line hidden #line hidden
WriteLiteral("\', null, function (data) {\r\n var dynatreeDataT" + WriteLiteral("\', null, function (data) {\r\n var dynatreeDataTrans" +
"ransformer = function (element) {\r\n var c" + "former = function (element) {\r\n var child = {" +
"hild = {\r\n title: element.Name,\r\n " + "\r\n title: element.Name,\r\n " +
" key: element.Path,\r\n " + " key: element.Path,\r\n " +
" isFolder: true\r\n " + " isFolder: true\r\n }\r\n " +
"}\r\n if (element.Children) {\r\n " + " if (element.Children) {\r\n " +
" child.children = [];\r\n " + "child.children = [];\r\n for (var i = 0; i " +
" for (var i = 0; i < element.Children.length; i++) {\r\n " + "< element.Children.length; i++) {\r\n c" +
" child.children.push(dynatreeDataTransform" + "hild.children.push(dynatreeDataTransformer(element.Children[i]));\r\n " +
"er(element.Children[i]));\r\n }\r\n " + " }\r\n }\r\n " +
" }\r\n ret" + " return child;\r\n };\r\n " +
"urn child;\r\n };\r\n " + " var dynatreeData = [];\r\n " +
" var dynatreeData = [];\r\n for (var i =" + " for (var i = 0; i < data.length; i++) {\r\n " +
" 0; i < data.length; i++) {\r\n dynatreeDat" + " dynatreeData.push(dynatreeDataTransformer(data[i]));\r\n " +
"a.push(dynatreeDataTransformer(data[i]));\r\n }" + " }\r\n\r\n ouTree.dynatree({\r\n " +
"\r\n\r\n ouTree.dynatree({\r\n " +
" children: dynatreeData,\r\n " + " children: dynatreeData,\r\n " +
" onActivate: function (node) {\r\n /" + "onActivate: function (node) {\r\n //alert(\'" +
"/alert(\'node selected: \' + node.data.key);\r\n " + "node selected: \' + node.data.key);\r\n }\r\n " +
" }\r\n });\r\n " + " });\r\n ouTreeLoaded = t" +
" ouTreeLoaded = true;\r\n ouUpdateTree();\r\n " + "rue;\r\n ouUpdateTree();\r\n " +
" });\r\n } else {\r\n " + " });\r\n } else {\r\n ouUpdateTr" +
" ouUpdateTree();\r\n }\r\n " + "ee();\r\n }\r\n ouDialog.dialog(\'o" +
" ouDialog.dialog(\'open\');\r\n };\r\n\r\n " + "pen\');\r\n };\r\n\r\n ouChangeLink.click" +
" ouChangeLink.click(ouChange);\r\n upd" + "(ouChange);\r\n updateDisplayOrganisationalUnit();\r\n " +
"ateDisplayOrganisationalUnit();\r\n });\r\n </scri" + " });\r\n </script>\r\n <div");
"pt>\r\n <div");
WriteLiteral(" style=\"margin-top: 8px;\""); 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(" style=\"float: left; margin: 0 7px 20px 0;\"");
WriteLiteral("></span>\r\n This item will be permanently deleted and cannot be recovered. " + 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\""); WriteLiteral(" type=\"text/javascript\"");
@@ -1024,13 +1080,13 @@ WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n"); WriteLiteral(">\r\n");
#line 531 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line 532 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
#line default #line default
#line hidden #line hidden
#line 531 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line 532 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
if (Model.CanDelete) if (Model.CanDelete)
{ {
@@ -1038,14 +1094,14 @@ WriteLiteral(">\r\n");
#line default #line default
#line hidden #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")); Write(Html.ActionLinkButton("Delete", MVC.API.DeviceProfile.Delete(Model.DeviceProfile.Id, true), "buttonDelete"));
#line default #line default
#line hidden #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(" "); 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"))); Write(Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceProfile.Id.ToString(), "DeviceProfile")));
@@ -30,8 +30,8 @@
@item.DeviceCount.ToString("n0") @item.DeviceCount.ToString("n0")
@if (item.DeviceDecommissionedCount > 0) @if (item.DeviceDecommissionedCount > 0)
{ {
<span class="smallMessage" title="@(item.DeviceDecommissionedCount) Decommissioned"> <span class="smallMessage" title="@(item.DeviceDecommissionedCount.ToString("n0")) Decommissioned">
(@(item.DeviceDecommissionedCount))</span> (@(item.DeviceDecommissionedCount.ToString("n0")))</span>
} }
</td> </td>
</tr> </tr>
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // 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 // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@@ -140,22 +140,22 @@ WriteLiteral(" <span");
WriteLiteral(" class=\"smallMessage\""); 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" #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 default
#line hidden #line hidden
, 1004), false) , 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 ("); WriteLiteral(">\r\n (");
#line 34 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml" #line 34 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
Write(item.DeviceDecommissionedCount); Write(item.DeviceDecommissionedCount.ToString("n0"));
#line default #line default