Added statistics to underlying operating system version.

This commit is contained in:
2017-09-11 02:05:07 +01:00
parent db1ce5c15c
commit d4add54b53
4 changed files with 36 additions and 24 deletions

View File

@@ -62,8 +62,10 @@ namespace DiscImageChef.Server
if(statistics.OperatingSystems != null)
{
operatingSystems = new List<NameValueStats>();
foreach(NameValueStats nvs in statistics.OperatingSystems)
operatingSystems.Add(new NameValueStats { name = Interop.DetectOS.GetPlatformName((Interop.PlatformID)Enum.Parse(typeof(Interop.PlatformID), nvs.name)), Value = nvs.Value });
foreach(OsStats nvs in statistics.OperatingSystems)
operatingSystems.Add(new NameValueStats { name = string.Format("{0}{1}{2}", Interop.DetectOS.GetPlatformName((Interop.PlatformID)Enum.Parse(typeof(Interop.PlatformID), nvs.name), nvs.version),
string.IsNullOrEmpty(nvs.version) ? "" : " ", nvs.version), Value = nvs.Value });
//operatingSystems.Add(new OsStats { name = Interop.DetectOS.GetPlatformName((Interop.PlatformID)Enum.Parse(typeof(Interop.PlatformID), nvs.name), nvs.version), Value = nvs.Value, version = nvs.version });
repOperatingSystems.DataSource = operatingSystems.OrderBy(os => os.name).ToList();
repOperatingSystems.DataBind();
}