TFS 937846 - Out of box Demo scenario support
1. Remove columns ModelNumber, SerialNumber, Platform, Processor and InstallerRAM 2. Add columns Building, TemperatureMeanValue and UpdateFirmwareStatus
This commit is contained in:
Родитель
24d0f40cc0
Коммит
b9c79b6ab1
|
@ -511,6 +511,15 @@ namespace GlobalResources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Building.
|
||||
/// </summary>
|
||||
public static string BuildingHeader {
|
||||
get {
|
||||
return ResourceManager.GetString("BuildingHeader", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid byte; expected a format like '24' (between 0 and 255).
|
||||
/// </summary>
|
||||
|
@ -2410,6 +2419,15 @@ namespace GlobalResources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to FwStatus.
|
||||
/// </summary>
|
||||
public static string FwStatusHeader {
|
||||
get {
|
||||
return ResourceManager.GetString("FwStatusHeader", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to General.
|
||||
/// </summary>
|
||||
|
@ -5020,6 +5038,15 @@ namespace GlobalResources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Temperature.
|
||||
/// </summary>
|
||||
public static string TemperatureHeader {
|
||||
get {
|
||||
return ResourceManager.GetString("TemperatureHeader", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This is the current device key.
|
||||
/// </summary>
|
||||
|
|
|
@ -2488,4 +2488,16 @@
|
|||
<value>Filter Name</value>
|
||||
<comment>Input label.</comment>
|
||||
</data>
|
||||
<data name="FwStatusHeader" xml:space="preserve">
|
||||
<value>FwStatus</value>
|
||||
<comment>Table column header.</comment>
|
||||
</data>
|
||||
<data name="TemperatureHeader" xml:space="preserve">
|
||||
<value>Temperature</value>
|
||||
<comment>Table column header.</comment>
|
||||
</data>
|
||||
<data name="BuildingHeader" xml:space="preserve">
|
||||
<value>Building</value>
|
||||
<comment>Table column header.</comment>
|
||||
</data>
|
||||
</root>
|
|
@ -14,16 +14,16 @@ namespace Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.
|
|||
public class DeviceListColumnsApiController : WebApiControllerBase
|
||||
{
|
||||
private readonly IUserSettingsLogic _userSettingsLogic;
|
||||
private readonly List<DeviceListColumns> defaultColumns = new List<DeviceListColumns>() {
|
||||
new DeviceListColumns() { Name = "tags.HubEnabledState", Alias = Strings.StatusHeader.ToUpperInvariant() },
|
||||
new DeviceListColumns() { Name = "deviceId", Alias = Strings.DeviceIdHeader.ToUpperInvariant() },
|
||||
new DeviceListColumns() { Name = "reported.System.Manufacturer", Alias = Strings.ManufactureHeader.ToUpperInvariant() },
|
||||
new DeviceListColumns() { Name = "reported.System.ModelNumber", Alias = Strings.ModelNumberHeader.ToUpperInvariant() },
|
||||
new DeviceListColumns() { Name = "reported.System.SerialNumber", Alias = Strings.SerialNumberHeader.ToUpperInvariant() },
|
||||
new DeviceListColumns() { Name = "reported.System.FirmwareVersion", Alias = Strings.FirmwareHeader.ToUpperInvariant() },
|
||||
new DeviceListColumns() { Name = "reported.System.Platform", Alias = Strings.PlatformHeader.ToUpperInvariant() },
|
||||
new DeviceListColumns() { Name = "reported.System.Processor", Alias = Strings.ProcessorHeader.ToUpperInvariant() },
|
||||
new DeviceListColumns() { Name = "reported.System.InstalledRAM", Alias = Strings.InstalledRamHeader.ToUpperInvariant() }};
|
||||
private readonly List<DeviceListColumns> defaultColumns = new List<DeviceListColumns>()
|
||||
{
|
||||
new DeviceListColumns { Name = "tags.HubEnabledState", Alias = Strings.StatusHeader.ToUpperInvariant() },
|
||||
new DeviceListColumns { Name = "deviceId", Alias = Strings.DeviceIdHeader.ToUpperInvariant() },
|
||||
new DeviceListColumns { Name = "reported.System.Manufacturer", Alias = Strings.ManufactureHeader.ToUpperInvariant() },
|
||||
new DeviceListColumns { Name = "reported.System.FirmwareVersion", Alias = Strings.FirmwareHeader.ToUpperInvariant() },
|
||||
new DeviceListColumns { Name = "tags.Building", Alias = Strings.BuildingHeader.ToUpperInvariant() },
|
||||
new DeviceListColumns { Name = "reported.Config.TemperatureMeanValue", Alias = Strings.TemperatureHeader.ToUpperInvariant() },
|
||||
new DeviceListColumns { Name = "reported.Method.UpdateFirmware.Status", Alias = Strings.FwStatusHeader.ToUpperInvariant() }
|
||||
};
|
||||
|
||||
public DeviceListColumnsApiController(IUserSettingsLogic userSettingsLogic)
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ namespace Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.
|
|||
|
||||
return await GetServiceResponseAsync<IEnumerable<DeviceListColumns>>(async () =>
|
||||
{
|
||||
var columns = await _userSettingsLogic.GetDeviceListColumnsAsync(userId);
|
||||
var columns = await _userSettingsLogic.GetDeviceListColumnsAsync(userId);
|
||||
|
||||
if (columns == null || columns.Count() == 0)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче