CP-45226: Added friendly name for new datasource 'hostload'.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
This commit is contained in:
Konstantina Chremmou 2023-10-24 14:50:08 +01:00
parent f7c9d43a64
commit fb9383df11
3 changed files with 19 additions and 0 deletions

View File

@ -5273,6 +5273,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Host CPU Load.
/// </summary>
public static string OPERATIONAL_METRICS_HOSTLOAD {
get {
return ResourceManager.GetString("OPERATIONAL_METRICS_HOSTLOAD", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to There was an error in preparing the host for upgrade..
/// </summary>

View File

@ -1856,6 +1856,9 @@
<data name="Message.name-wlb_vm_relocation" xml:space="preserve">
<value>WLB VM Relocation</value>
</data>
<data name="OPERATIONAL_METRICS_HOSTLOAD" xml:space="preserve">
<value>Host CPU Load</value>
</data>
<data name="PREPARE_HOST_UPGRADE_ERROR_PREPARING_HOST" xml:space="preserve">
<value>There was an error in preparing the host for upgrade.</value>
</data>

View File

@ -671,6 +671,7 @@ namespace XenAdmin.Core
static Regex XapiMemoryRegex = new Regex("^xapi_(allocation|free_memory|live_memory|memory_usage)_kib$");
static Regex StatefileLatencyRegex = new Regex("^statefile/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/latency$");
static Regex LoadAvgRegex = new Regex("loadavg");
static Regex HostLoadRegex = new Regex("hostload");
static Regex SrRegex = new Regex("^sr_[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}_cache_(size|hits|misses)");
static Regex SrIORegex = new Regex("^(io_throughput|iops)_(read|write|total)_([a-f0-9]{8})$");
static Regex SrOtherRegex = new Regex("^(latency|avgqu_sz|inflight|iowait)_([a-f0-9]{8})$");
@ -706,6 +707,9 @@ namespace XenAdmin.Core
if (LoadAvgRegex.IsMatch(name))
return DataSourceCategory.LoadAverage;
if (HostLoadRegex.IsMatch(name))
return DataSourceCategory.LoadAverage;
if (name.StartsWith("pvsaccelerator"))
return DataSourceCategory.Pvs;
@ -899,6 +903,9 @@ namespace XenAdmin.Core
if (LoadAvgRegex.IsMatch(name))
return FriendlyNameManager.GetFriendlyName("Label-performance.loadavg");
if (HostLoadRegex.IsMatch(name))
return FriendlyNames.OPERATIONAL_METRICS_HOSTLOAD;
return FriendlyNameManager.GetFriendlyName(string.Format("Label-performance.{0}", name));
}