Update: Device Battery field, Excel CSV Format

Device Battery import & export; Leading zero workaround for Excel
This commit is contained in:
Gary Sharp
2014-05-27 16:36:42 +10:00
parent 825627e345
commit 4e69253852
16 changed files with 400 additions and 80 deletions
@@ -11,6 +11,11 @@ namespace Disco.Models.Services.Devices.Exporting
{
public DeviceExportTypes ExportType { get; set; }
public int? ExportTypeTargetId { get; set; }
/// <summary>
/// Adds '=' to the beginning of the string to stop Excel removing the leading zeros
/// </summary>
public bool ExcelCsvFormat { get; set; }
// Device
[Display(ShortName = "Device", Name = "Serial Number", Description = "The device serial number")]
@@ -41,6 +46,8 @@ namespace Disco.Models.Services.Devices.Exporting
public bool DetailWLanMacAddress { get; set; }
[Display(ShortName = "Details", Name = "AC Adapter", Description = "The AC Adapter associated with the device")]
public bool DetailACAdapter { get; set; }
[Display(ShortName = "Details", Name = "Battery", Description = "The Battery associated with the device")]
public bool DetailBattery { get; set; }
// Model
[Display(ShortName = "Model", Name = "Identifier", Description = "The identifier of the device model associated with the device")]
@@ -124,6 +131,7 @@ namespace Disco.Models.Services.Devices.Exporting
return new DeviceExportOptions()
{
ExportType = DeviceExportTypes.All,
ExcelCsvFormat = true,
DeviceSerialNumber = true,
ModelId = true,
ProfileId = true,
@@ -26,6 +26,8 @@ namespace Disco.Models.Services.Devices.Importing
DetailWLanMacAddress,
[Display(Name = "Device AC Adapter", Description = "The AC Adapter associated with the device")]
DetailACAdapter,
[Display(Name = "Device Battery", Description = "The Battery associated with the device")]
DetailBattery,
[Display(Name = "Model Identifier", Description = "The identifier of the device model associated with the device")]
ModelId,