From 19503366c484484189dd3faa4303d9c167e53261 Mon Sep 17 00:00:00 2001 From: Gary Sharp Date: Thu, 25 Jul 2013 17:47:40 +1000 Subject: [PATCH] Update: Device Count Details More information about device membership in Batches, Profiles and Models. --- .../DeviceBatch/ConfigDeviceBatchShowModel.cs | 3 + .../ConfigDeviceBatchShowModelMembership.cs | 15 + ...cs => ConfigDeviceModelComponentsModel.cs} | 0 .../ConfigDeviceModelIndexModelItem.cs | 1 + .../DeviceModel/ConfigDeviceModelShowModel.cs | 3 + .../ConfigDeviceProfileShowModel.cs | 3 + .../Controllers/DeviceBatchController.cs | 31 +- .../Controllers/DeviceModelController.cs | 16 +- .../Controllers/DeviceProfileController.cs | 16 +- .../Config/Models/DeviceBatch/ShowModel.cs | 1 + .../DeviceBatch/_ShowModelMembership.cs | 15 + .../Config/Models/DeviceModel/IndexModel.cs | 3 +- .../Config/Models/DeviceModel/ShowModel.cs | 3 + .../Models/DeviceModel/_IndexModelItem.cs | 1 + .../Config/Models/DeviceProfile/ShowModel.cs | 3 + .../Config/Views/DeviceBatch/Index.cshtml | 4 +- .../Views/DeviceBatch/Index.generated.cs | 10 +- .../Config/Views/DeviceBatch/Show.cshtml | 143 +++-- .../Views/DeviceBatch/Show.generated.cs | 539 +++++++++++------- .../Config/Views/DeviceModel/Index.cshtml | 5 + .../Views/DeviceModel/Index.generated.cs | 55 +- .../Config/Views/DeviceModel/Show.cshtml | 11 + .../Views/DeviceModel/Show.generated.cs | 125 +++- .../Config/Views/DeviceProfile/Show.cshtml | 98 ++-- .../Views/DeviceProfile/Show.generated.cs | 247 +++++--- .../Views/DeviceProfile/_TableRender.cshtml | 4 +- .../DeviceProfile/_TableRender.generated.cs | 10 +- 27 files changed, 883 insertions(+), 482 deletions(-) create mode 100644 Disco.Models/UI/Config/DeviceBatch/ConfigDeviceBatchShowModelMembership.cs rename Disco.Models/UI/Config/DeviceModel/{ConfigDeviceModelShowModelComponents.cs => ConfigDeviceModelComponentsModel.cs} (100%) create mode 100644 Disco.Web/Areas/Config/Models/DeviceBatch/_ShowModelMembership.cs diff --git a/Disco.Models/UI/Config/DeviceBatch/ConfigDeviceBatchShowModel.cs b/Disco.Models/UI/Config/DeviceBatch/ConfigDeviceBatchShowModel.cs index 513eebe0..6344a51d 100644 --- a/Disco.Models/UI/Config/DeviceBatch/ConfigDeviceBatchShowModel.cs +++ b/Disco.Models/UI/Config/DeviceBatch/ConfigDeviceBatchShowModel.cs @@ -10,6 +10,9 @@ namespace Disco.Models.UI.Config.DeviceBatch { Disco.Models.Repository.DeviceBatch DeviceBatch { get; set; } List DeviceModels { get; set; } + + List DeviceModelMembers { get; set; } + int DeviceCount { get; set; } int DeviceDecommissionedCount { get; set; } bool CanDelete { get; set; } diff --git a/Disco.Models/UI/Config/DeviceBatch/ConfigDeviceBatchShowModelMembership.cs b/Disco.Models/UI/Config/DeviceBatch/ConfigDeviceBatchShowModelMembership.cs new file mode 100644 index 00000000..843acda7 --- /dev/null +++ b/Disco.Models/UI/Config/DeviceBatch/ConfigDeviceBatchShowModelMembership.cs @@ -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; } + } +} diff --git a/Disco.Models/UI/Config/DeviceModel/ConfigDeviceModelShowModelComponents.cs b/Disco.Models/UI/Config/DeviceModel/ConfigDeviceModelComponentsModel.cs similarity index 100% rename from Disco.Models/UI/Config/DeviceModel/ConfigDeviceModelShowModelComponents.cs rename to Disco.Models/UI/Config/DeviceModel/ConfigDeviceModelComponentsModel.cs diff --git a/Disco.Models/UI/Config/DeviceModel/ConfigDeviceModelIndexModelItem.cs b/Disco.Models/UI/Config/DeviceModel/ConfigDeviceModelIndexModelItem.cs index f52f5b90..234ffa86 100644 --- a/Disco.Models/UI/Config/DeviceModel/ConfigDeviceModelIndexModelItem.cs +++ b/Disco.Models/UI/Config/DeviceModel/ConfigDeviceModelIndexModelItem.cs @@ -14,5 +14,6 @@ namespace Disco.Models.UI.Config.DeviceModel string Model { get; set; } string ModelType { get; set; } int DeviceCount { get; set; } + int DeviceDecommissionedCount { get; set; } } } diff --git a/Disco.Models/UI/Config/DeviceModel/ConfigDeviceModelShowModel.cs b/Disco.Models/UI/Config/DeviceModel/ConfigDeviceModelShowModel.cs index f23551c1..f448fc89 100644 --- a/Disco.Models/UI/Config/DeviceModel/ConfigDeviceModelShowModel.cs +++ b/Disco.Models/UI/Config/DeviceModel/ConfigDeviceModelShowModel.cs @@ -12,6 +12,9 @@ namespace Disco.Models.UI.Config.DeviceModel ConfigDeviceModelComponentsModel DeviceComponentsModel { get; set; } + int DeviceCount { get; set; } + int DeviceDecommissionedCount { get; set; } + bool CanDelete { get; set; } } } diff --git a/Disco.Models/UI/Config/DeviceProfile/ConfigDeviceProfileShowModel.cs b/Disco.Models/UI/Config/DeviceProfile/ConfigDeviceProfileShowModel.cs index 2c415984..c9dd868f 100644 --- a/Disco.Models/UI/Config/DeviceProfile/ConfigDeviceProfileShowModel.cs +++ b/Disco.Models/UI/Config/DeviceProfile/ConfigDeviceProfileShowModel.cs @@ -11,6 +11,9 @@ namespace Disco.Models.UI.Config.DeviceProfile Disco.Models.Repository.DeviceProfile DeviceProfile { get; set; } List OrganisationAddresses { get; set; } + int DeviceCount { get; set; } + int DeviceDecommissionedCount { get; set; } + bool CanDelete { get; set; } } } diff --git a/Disco.Web/Areas/Config/Controllers/DeviceBatchController.cs b/Disco.Web/Areas/Config/Controllers/DeviceBatchController.cs index 217953dd..dfbf0ad5 100644 --- a/Disco.Web/Areas/Config/Controllers/DeviceBatchController.cs +++ b/Disco.Web/Areas/Config/Controllers/DeviceBatchController.cs @@ -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().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(this.ControllerContext, m); - + return View(m); } } diff --git a/Disco.Web/Areas/Config/Controllers/DeviceModelController.cs b/Disco.Web/Areas/Config/Controllers/DeviceModelController.cs index a6b54d41..35755da4 100644 --- a/Disco.Web/Areas/Config/Controllers/DeviceModelController.cs +++ b/Disco.Web/Areas/Config/Controllers/DeviceModelController.cs @@ -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() }; diff --git a/Disco.Web/Areas/Config/Controllers/DeviceProfileController.cs b/Disco.Web/Areas/Config/Controllers/DeviceProfileController.cs index 6704794e..c65bcbf5 100644 --- a/Disco.Web/Areas/Config/Controllers/DeviceProfileController.cs +++ b/Disco.Web/Areas/Config/Controllers/DeviceProfileController.cs @@ -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(); diff --git a/Disco.Web/Areas/Config/Models/DeviceBatch/ShowModel.cs b/Disco.Web/Areas/Config/Models/DeviceBatch/ShowModel.cs index f7b15988..7d7aa083 100644 --- a/Disco.Web/Areas/Config/Models/DeviceBatch/ShowModel.cs +++ b/Disco.Web/Areas/Config/Models/DeviceBatch/ShowModel.cs @@ -11,6 +11,7 @@ namespace Disco.Web.Areas.Config.Models.DeviceBatch { public Disco.Models.Repository.DeviceBatch DeviceBatch { get; set; } public List DeviceModels { get; set; } + public List DeviceModelMembers { get; set; } public int DeviceCount { get; set; } public int DeviceDecommissionedCount { get; set; } public bool CanDelete { get; set; } diff --git a/Disco.Web/Areas/Config/Models/DeviceBatch/_ShowModelMembership.cs b/Disco.Web/Areas/Config/Models/DeviceBatch/_ShowModelMembership.cs new file mode 100644 index 00000000..b9a4fdd3 --- /dev/null +++ b/Disco.Web/Areas/Config/Models/DeviceBatch/_ShowModelMembership.cs @@ -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; } + } +} \ No newline at end of file diff --git a/Disco.Web/Areas/Config/Models/DeviceModel/IndexModel.cs b/Disco.Web/Areas/Config/Models/DeviceModel/IndexModel.cs index 13dba06b..5bad732d 100644 --- a/Disco.Web/Areas/Config/Models/DeviceModel/IndexModel.cs +++ b/Disco.Web/Areas/Config/Models/DeviceModel/IndexModel.cs @@ -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().ToList(); return m; diff --git a/Disco.Web/Areas/Config/Models/DeviceModel/ShowModel.cs b/Disco.Web/Areas/Config/Models/DeviceModel/ShowModel.cs index 8218b2d0..79ab0044 100644 --- a/Disco.Web/Areas/Config/Models/DeviceModel/ShowModel.cs +++ b/Disco.Web/Areas/Config/Models/DeviceModel/ShowModel.cs @@ -15,6 +15,9 @@ namespace Disco.Web.Areas.Config.Models.DeviceModel public List WarrantyProviders { get; set; } + public int DeviceCount { get; set; } + public int DeviceDecommissionedCount { get; set; } + public bool CanDelete { get; set; } } } \ No newline at end of file diff --git a/Disco.Web/Areas/Config/Models/DeviceModel/_IndexModelItem.cs b/Disco.Web/Areas/Config/Models/DeviceModel/_IndexModelItem.cs index ee47c29e..7c79f144 100644 --- a/Disco.Web/Areas/Config/Models/DeviceModel/_IndexModelItem.cs +++ b/Disco.Web/Areas/Config/Models/DeviceModel/_IndexModelItem.cs @@ -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() { diff --git a/Disco.Web/Areas/Config/Models/DeviceProfile/ShowModel.cs b/Disco.Web/Areas/Config/Models/DeviceProfile/ShowModel.cs index e47c552c..962471fd 100644 --- a/Disco.Web/Areas/Config/Models/DeviceProfile/ShowModel.cs +++ b/Disco.Web/Areas/Config/Models/DeviceProfile/ShowModel.cs @@ -16,6 +16,9 @@ namespace Disco.Web.Areas.Config.Models.DeviceProfile public List CertificateProviders { get; set; } + public int DeviceCount { get; set; } + public int DeviceDecommissionedCount { get; set; } + public bool CanDelete { get; set; } } } \ No newline at end of file diff --git a/Disco.Web/Areas/Config/Views/DeviceBatch/Index.cshtml b/Disco.Web/Areas/Config/Views/DeviceBatch/Index.cshtml index b77dc869..9de32b13 100644 --- a/Disco.Web/Areas/Config/Views/DeviceBatch/Index.cshtml +++ b/Disco.Web/Areas/Config/Views/DeviceBatch/Index.cshtml @@ -53,8 +53,8 @@ } @if (item.DeviceDecommissionedCount > 0) { - - (@(item.DeviceDecommissionedCount)) + + (@(item.DeviceDecommissionedCount.ToString("n0"))) } diff --git a/Disco.Web/Areas/Config/Views/DeviceBatch/Index.generated.cs b/Disco.Web/Areas/Config/Views/DeviceBatch/Index.generated.cs index d36bafc1..f6da7c17 100644 --- a/Disco.Web/Areas/Config/Views/DeviceBatch/Index.generated.cs +++ b/Disco.Web/Areas/Config/Views/DeviceBatch/Index.generated.cs @@ -2,7 +2,7 @@ //------------------------------------------------------------------------------ // // 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(" (item.DeviceDecommissionedCount +, Tuple.Create(Tuple.Create("", 1783), Tuple.Create(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 diff --git a/Disco.Web/Areas/Config/Views/DeviceBatch/Show.cshtml b/Disco.Web/Areas/Config/Views/DeviceBatch/Show.cshtml index 0f5e35d9..e817597f 100644 --- a/Disco.Web/Areas/Config/Views/DeviceBatch/Show.cshtml +++ b/Disco.Web/Areas/Config/Views/DeviceBatch/Show.cshtml @@ -8,16 +8,14 @@
- - - + + + + -
- Id: + Id: @Html.DisplayFor(model => model.DeviceBatch.Id)
- Name: + Name: @Html.EditorFor(model => model.DeviceBatch.Name) @AjaxHelpers.AjaxSave() @@ -35,35 +33,86 @@
- Device Count: + Default Device Model: - @if (Model.DeviceBatch.UnitQuantity.HasValue) - { - @Model.DeviceCount of @(Model.DeviceBatch.UnitQuantity.Value) + @Html.DropDownListFor(model => model.DeviceBatch.DefaultDeviceModelId, Model.DeviceModels.ToSelectListItems()) + @AjaxHelpers.AjaxSave() + @AjaxHelpers.AjaxLoader() + +
+ Devices added offline will default to this Device Model. + Once a device enrols the Device Model will be accurately represented. +
Devices + @if (Model.DeviceModelMembers.Count > 0) + { + + + + + + + + + + @foreach (var membership in Model.DeviceModelMembers.OrderByDescending(dmm => dmm.DeviceCount)) + { + + + + + + } + + + + + + + + +
ModelDevice CountDecommissioned
+ @Html.ActionLink(membership.DeviceModel.ToString(), MVC.Config.DeviceModel.Index(membership.DeviceModel.Id)) + + @membership.DeviceCount.ToString("n0") + + @membership.DeviceDecommissionedCount.ToString("n0") +
Total Models: @Model.DeviceModelMembers.Count.ToString("n0")@Model.DeviceCount.ToString("n0")@Model.DeviceDecommissionedCount.ToString("n0")
} else - { - @Model.DeviceCount + { +
No device models are referenced in this batch.
} - managed by Disco - @if (Model.DeviceDecommissionedCount > 0) - { - (@(Model.DeviceDecommissionedCount) - Decommissioned) + @if (Model.DeviceBatch.UnitQuantity.HasValue && Model.DeviceBatch.UnitQuantity.Value > Model.DeviceCount) + { + var missingCount = Model.DeviceBatch.UnitQuantity.Value - Model.DeviceCount; +
+ + @Model.DeviceCount.ToString("n0") of @(Model.DeviceBatch.UnitQuantity.Value.ToString("n0")) purchased devices are managed by Disco. @missingCount.ToString("n0") @(missingCount == 1 ? "is" : "are") not managed. +
}
- Purchase: + Purchase: - - - - - - - - -
- Purchase Date: + Purchase Date: @Html.EditorFor(model => model.DeviceBatch.PurchaseDate) @@ -84,8 +133,7 @@
- Supplier: + Supplier: @Html.EditorFor(model => model.DeviceBatch.Supplier) @@ -104,8 +152,7 @@
- Unit Cost: + Unit Cost: @Html.EditorFor(model => model.DeviceBatch.UnitCost) @@ -124,8 +171,7 @@
- Quantity: + Quantity: @Html.EditorFor(model => model.DeviceBatch.UnitQuantity) @@ -201,37 +247,12 @@
- Default Device Model: - - @Html.DropDownListFor(model => model.DeviceBatch.DefaultDeviceModelId, Model.DeviceModels.ToSelectListItems()) - @AjaxHelpers.AjaxSave() - @AjaxHelpers.AjaxLoader() - -
- Devices added offline will default to this Device Model. - Once a device enrols the Device Model will be accurately represented. -
- Warranty: + Warranty: - -
- Valid Until: + Valid Until: @Html.EditorFor(model => model.DeviceBatch.WarrantyValidUntil) @@ -309,14 +330,12 @@
- Insurance: + Insurance: - - - - \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Purchase Date:\r\n \r\n " + -" - - - \r\n \r\n \r\n \r\n - - - - \r\n \r\n \r\n \r\n \r\n \r\n Valid Until:\r\n \r\n " + -" \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Supplier:\r\n \r\n " + -" \r\n \r\n \r\n " + -" \r\n } diff --git a/Disco.Web/Areas/Config/Views/DeviceModel/Index.generated.cs b/Disco.Web/Areas/Config/Views/DeviceModel/Index.generated.cs index e89a9bba..97b67a3f 100644 --- a/Disco.Web/Areas/Config/Views/DeviceModel/Index.generated.cs +++ b/Disco.Web/Areas/Config/Views/DeviceModel/Index.generated.cs @@ -2,7 +2,7 @@ //------------------------------------------------------------------------------ // // 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 \r\n \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(" (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(")\r\n"); + + + #line 44 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml" + } + + + #line default + #line hidden +WriteLiteral(" \r\n \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())); diff --git a/Disco.Web/Areas/Config/Views/DeviceModel/Show.cshtml b/Disco.Web/Areas/Config/Views/DeviceModel/Show.cshtml index 85ba827d..a0663f9f 100644 --- a/Disco.Web/Areas/Config/Views/DeviceModel/Show.cshtml +++ b/Disco.Web/Areas/Config/Views/DeviceModel/Show.cshtml @@ -37,6 +37,16 @@ @Html.DisplayFor(model => model.DeviceModel.Model) + + + + \r\n \r\n \r\n \r\n \r\n \r\n " + +"\r\n \r\n \r\n \r\n \r\n \r\n \r\n \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 \r\n \r\n \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 \r\n \r\n \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(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(Url.Action(MVC.API.DeviceModel.Image(Model.DeviceModel.Id, Model.DeviceModel.ImageHash())) #line default #line hidden -, 2157), false) +, 2696), false) ); WriteLiteral(" />\r\n \r\n \r\n \r\n
- Supplier: + Supplier: @Html.EditorFor(model => model.DeviceBatch.InsuranceSupplier) @@ -335,8 +354,7 @@
- Insured Date: + Insured Date: @Html.EditorFor(model => model.DeviceBatch.InsuredDate) @@ -357,8 +375,7 @@
- Insured Until: + Insured Until: @Html.EditorFor(model => model.DeviceBatch.InsuredUntil) @@ -435,8 +452,7 @@
- Comments:
+
Comments:
@AjaxHelpers.AjaxLoader("ajaxComments")
@@ -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")) } diff --git a/Disco.Web/Areas/Config/Views/DeviceBatch/Show.generated.cs b/Disco.Web/Areas/Config/Views/DeviceBatch/Show.generated.cs index 1808b3e0..e7c7e316 100644 --- a/Disco.Web/Areas/Config/Views/DeviceBatch/Show.generated.cs +++ b/Disco.Web/Areas/Config/Views/DeviceBatch/Show.generated.cs @@ -2,7 +2,7 @@ //------------------------------------------------------------------------------ // // 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 \r\n \r\n \r\n Id:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n - - - - \r\n \r\n " + +" \r\n \r\n " + +" \r\n \r\n \r\n \r\n " + +" + + + + + + + +"); - #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(" \r\n \r\n " + +"\r\n " + +"\r\n \r\n"); + + + #line 84 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + } + + + #line default + #line hidden +WriteLiteral(" \r\n \r\n " + +" \r\n \r\n \r\n \r\n \r\n \r\n " + +"
\r\n"); +WriteLiteral(">Id:\r\n \r\n \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
\r\n " + -" Name:\r\n "); +WriteLiteral("\r\n
Name:\r\n " + +" "); - #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' - ); - }); - -
- Device Count: - -"); +WriteLiteral("\',\r\n \'BatchName\'\r\n );\r\n " + +" });\r\n \r\n
Default Device Model:\r\n \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 \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 \r\n
\r\n " + +" Devices added offline will default to this Device Model.\r\n On" + +"ce a device enrols the Device Model will be accurately represented.\r\n " + +"
Devices\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(" "); +WriteLiteral(" +
ModelDevice CountDecommissioned
\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 \r\n"); + +WriteLiteral(" "); + + + #line 78 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + Write(membership.DeviceCount.ToString("n0")); + + + #line default + #line hidden +WriteLiteral("\r\n \r\n"); + +WriteLiteral(" "); + + + #line 81 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + Write(membership.DeviceDecommissionedCount.ToString("n0")); + + + #line default + #line hidden +WriteLiteral("\r\n
Total Models: "); + + + #line 88 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + Write(Model.DeviceModelMembers.Count.ToString("n0")); + + + #line default + #line hidden +WriteLiteral(""); + + + #line 89 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + Write(Model.DeviceCount.ToString("n0")); + + + #line default + #line hidden +WriteLiteral(""); + + + #line 90 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + Write(Model.DeviceDecommissionedCount.ToString("n0")); + + + #line default + #line hidden +WriteLiteral("
\r\n"); + + + #line 94 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + } + else + { + + + #line default + #line hidden +WriteLiteral(" No device models are referenced in this batch.\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(" \r\n \r\n"); + +WriteLiteral(" "); + + + #line 104 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + Write(Model.DeviceCount.ToString("n0")); #line default @@ -159,78 +360,41 @@ WriteLiteral(" "); 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("\r\n"); +WriteLiteral(" purchased devices are managed by Disco. "); - #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.\r\n \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(" ("); - - - #line 53 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" - Write(Model.DeviceDecommissionedCount); - - - #line default - #line hidden -WriteLiteral("\r\n Decommissioned)\r\n"); - - - #line 55 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" - } - - - #line default - #line hidden -WriteLiteral("
\r\n " + -" Purchase:\r\n
Purchase:\r\n " + +" \r\n"); +WriteLiteral(">Purchase Date:\r\n \r\n \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(@"',
- Supplier: + Supplier: "); @@ -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(@"',
- Unit Cost: + Unit Cost: "); @@ -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(@"',
- Quantity: + Quantity: "); @@ -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
\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
\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 \r\n " + -" \r\n
\r\n" + -" Default Device Model:\r\n \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 \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 \r\n
\r\n " + -" Devices added offline will default to this Device Model. - Once a device enrols the Device Model will be accurately represented. -
- Warranty: -
Wa" + +"rranty:\r\n \r\n"); +WriteLiteral(">Valid Until:\r\n \r\n \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
\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
\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 \r\n " + -" \r\n
\r\n" + -" Insurance:\r\n
In" + +"surance:\r\n \r\n"); +WriteLiteral(">Supplier:\r\n \r\n \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 \r\n " + -" \r\n"); +WriteLiteral(">Insured Date:\r\n \r\n \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 \r\n " + -" \r\n"); +WriteLiteral(">Insured Until:\r\n \r\n \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
\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
\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 \r\n \r\n
\r\n Comments:
\r\n"); +"
Comments:
\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
\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" } diff --git a/Disco.Web/Areas/Config/Views/DeviceModel/Index.cshtml b/Disco.Web/Areas/Config/Views/DeviceModel/Index.cshtml index e1928c75..90b6920c 100644 --- a/Disco.Web/Areas/Config/Views/DeviceModel/Index.cshtml +++ b/Disco.Web/Areas/Config/Views/DeviceModel/Index.cshtml @@ -37,6 +37,11 @@ @item.DeviceCount.ToString("n0") + @if (item.DeviceDecommissionedCount > 0) + { + + (@(item.DeviceDecommissionedCount.ToString("n0"))) + }
Statistics +
@Model.DeviceCount.ToString("n0") @(Model.DeviceCount == 1 ? "devices is" : "devices are") of this model type.
+ @if (Model.DeviceDecommissionedCount > 0) + { +
@Model.DeviceDecommissionedCount.ToString("n0") @(Model.DeviceDecommissionedCount == 1 ? "device is" : "devices are") decommissioned.
+ } +
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")) diff --git a/Disco.Web/Areas/Config/Views/DeviceModel/Show.generated.cs b/Disco.Web/Areas/Config/Views/DeviceModel/Show.generated.cs index 782e73c3..c970be4e 100644 --- a/Disco.Web/Areas/Config/Views/DeviceModel/Show.generated.cs +++ b/Disco.Web/Areas/Config/Views/DeviceModel/Show.generated.cs @@ -2,7 +2,7 @@ //------------------------------------------------------------------------------ // // 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 \r\n
\r\n " + -" Default Purchase Date:\r\n \r\n"); +WriteLiteral("\r\n
Statistics\r\n
"); + + + #line 43 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml" + Write(Model.DeviceCount.ToString("n0")); + + + #line default + #line hidden +WriteLiteral(" "); + + + #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.
\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(" "); + + + #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.\r\n"); + + + #line 47 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml" + } + + + #line default + #line hidden +WriteLiteral("
\r\n " + +" Default Purchase Date:\r\n \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
\r\n " + @@ -207,13 +273,13 @@ WriteLiteral(">\r\n Update Image:\r\n "\r\n \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"))); diff --git a/Disco.Web/Areas/Config/Views/DeviceProfile/Show.cshtml b/Disco.Web/Areas/Config/Views/DeviceProfile/Show.cshtml index 89a1e425..3eb245c1 100644 --- a/Disco.Web/Areas/Config/Views/DeviceProfile/Show.cshtml +++ b/Disco.Web/Areas/Config/Views/DeviceProfile/Show.cshtml @@ -7,16 +7,14 @@
- - - - - + + + + - - - diff --git a/Disco.Web/Areas/Config/Views/DeviceProfile/_TableRender.generated.cs b/Disco.Web/Areas/Config/Views/DeviceProfile/_TableRender.generated.cs index a1a5f988..4c989a6f 100644 --- a/Disco.Web/Areas/Config/Views/DeviceProfile/_TableRender.generated.cs +++ b/Disco.Web/Areas/Config/Views/DeviceProfile/_TableRender.generated.cs @@ -2,7 +2,7 @@ //------------------------------------------------------------------------------ // // 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(" (item.DeviceDecommissionedCount +, Tuple.Create(Tuple.Create("", 1004), Tuple.Create(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
- Id: + Id: @Html.DisplayFor(model => model.DeviceProfile.Id)
- Name: + Name: @Html.TextBoxFor(model => model.DeviceProfile.Name) @AjaxHelpers.AjaxSave() @@ -63,8 +61,7 @@
- Short Name: + Short Name: @Html.TextBoxFor(model => model.DeviceProfile.ShortName) @AjaxHelpers.AjaxSave() @@ -111,8 +108,7 @@
- Description: + Description: @Html.TextBoxFor(model => model.DeviceProfile.Description) @AjaxHelpers.AjaxSave() @@ -159,8 +155,17 @@
- Distribution Type: + Members +
@Model.DeviceCount.ToString("n0") @(Model.DeviceCount == 1 ? "devices is a member" : "devices are members") of this profile.
+ @if (Model.DeviceDecommissionedCount > 0) + { +
@Model.DeviceDecommissionedCount.ToString("n0") @(Model.DeviceDecommissionedCount == 1 ? "device is" : "devices are") decommissioned.
+ } +
Distribution Type: @Html.DropDownList("DeviceProfile_DistributionType", Model.DeviceProfileDistributionTypes) @@ -185,8 +190,7 @@
- Address: + Address: @Html.DropDownListFor(m => m.DeviceProfile.DefaultOrganisationAddress, Model.OrganisationAddresses.ToSelectListItems(Model.DeviceProfile.DefaultOrganisationAddress, true, "None")) @@ -211,8 +215,7 @@
- Allocate Certificates: + Allocate Certificates: @Html.DropDownListFor(model => model.DeviceProfile.CertificateProviderId, Model.CertificateProviders.ToSelectListItems(null, true, "Not Allocated")) @@ -248,14 +251,12 @@
- Computer Name Template Expression: + Computer Name Template Expression: @Html.TextBoxFor(model => model.DeviceProfile.ComputerNameTemplate) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader() - -   +   \r\n \r\n This item will be permanently deleted and cannot be recovered. " + -"Are you sure?

\r\n\r\n\r\n\r\n\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"))); diff --git a/Disco.Web/Areas/Config/Views/DeviceProfile/_TableRender.cshtml b/Disco.Web/Areas/Config/Views/DeviceProfile/_TableRender.cshtml index 76e84788..17779a43 100644 --- a/Disco.Web/Areas/Config/Views/DeviceProfile/_TableRender.cshtml +++ b/Disco.Web/Areas/Config/Views/DeviceProfile/_TableRender.cshtml @@ -30,8 +30,8 @@ @item.DeviceCount.ToString("n0") @if (item.DeviceDecommissionedCount > 0) { - - (@(item.DeviceDecommissionedCount)) + + (@(item.DeviceDecommissionedCount.ToString("n0"))) }