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
@@ -21,7 +21,8 @@ namespace Disco.Web.Areas.Config.Models.DeviceModel
Manufacturer = dm.Manufacturer,
Model = dm.Model,
ModelType = dm.ModelType,
DeviceCount = dm.Devices.Count
DeviceCount = dm.Devices.Count,
DeviceDecommissionedCount = dm.Devices.Count(d => d.DecommissionedDate.HasValue)
}).ToArray().Cast<ConfigDeviceModelIndexModelItem>().ToList();
return m;
@@ -15,6 +15,9 @@ namespace Disco.Web.Areas.Config.Models.DeviceModel
public List<PluginFeatureManifest> WarrantyProviders { get; set; }
public int DeviceCount { get; set; }
public int DeviceDecommissionedCount { get; set; }
public bool CanDelete { get; set; }
}
}
@@ -15,6 +15,7 @@ namespace Disco.Web.Areas.Config.Models.DeviceModel
public string Model { get; set; }
public string ModelType { get; set; }
public int DeviceCount { get; set; }
public int DeviceDecommissionedCount { get; set; }
public override string ToString()
{