Update: Job Entity -> Enum Support 2
Support the DistributionType Enum in Device Profiles
This commit is contained in:
@@ -22,7 +22,7 @@ namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
||||
ShortName = dp.ShortName,
|
||||
Address = dp.DefaultOrganisationAddress,
|
||||
Description = dp.Description,
|
||||
DistributionTypeId = (int)dp.DistributionType,
|
||||
DistributionType = dp.DistributionType.Value,
|
||||
DeviceCount = dp.Devices.Count,
|
||||
DeviceDecommissionedCount = dp.Devices.Count(d => d.DecommissionedDate.HasValue)
|
||||
}).ToArray().Cast<ConfigDeviceProfileIndexModelItem>().ToList();
|
||||
|
||||
@@ -16,15 +16,7 @@ namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
||||
public int? Address { get; set; }
|
||||
public string AddressName { get; set; }
|
||||
public string Description { get; set; }
|
||||
public int DistributionTypeId { get; set; }
|
||||
|
||||
public string DistributionType
|
||||
{
|
||||
get
|
||||
{
|
||||
return Enum.GetName(typeof(Disco.Models.Repository.DeviceProfile.DistributionTypes), this.DistributionTypeId);
|
||||
}
|
||||
}
|
||||
public Disco.Models.Repository.DeviceProfile.DistributionTypes DistributionType { get; set; }
|
||||
|
||||
public int DeviceCount { get; set; }
|
||||
public int DeviceDecommissionedCount { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user