diff --git a/ui/scripts/metrics.js b/ui/scripts/metrics.js index a37d43252b8..87f933ee25a 100644 --- a/ui/scripts/metrics.js +++ b/ui/scripts/metrics.js @@ -62,6 +62,11 @@ columns: { cpuusedavg: { label: 'label.cpu.used.avg', + thresholdcolor: true, + thresholds: { + notification: 'cpunotificationthreshold', + disable: 'cpudisablethreshold' + } }, cpumaxdev: { label: 'label.cpu.max.dev' @@ -73,7 +78,12 @@ collapsible: true, columns: { cpuallocated: { - label: 'label.allocated' + label: 'label.allocated', + thresholdcolor: true, + thresholds: { + notification: 'cpunotificationthreshold', + disable: 'cpudisablethreshold' + } }, cputotal: { label: 'label.cpu.total.ghz' @@ -85,7 +95,12 @@ collapsible: true, columns: { memusedavg: { - label: 'label.memory.used.avg' + label: 'label.memory.used.avg', + thresholdcolor: true, + thresholds: { + notification: 'memnotificationthreshold', + disable: 'memdisablethreshold' + } }, memmaxdev: { label: 'label.memory.max.dev' @@ -97,7 +112,12 @@ collapsible: true, columns: { memallocated: { - label: 'label.allocated' + label: 'label.allocated', + thresholdcolor: true, + thresholds: { + notification: 'memnotificationthreshold', + disable: 'memdisablethreshold' + } }, memtotal: { label: 'label.memory.total.gb' @@ -125,6 +145,12 @@ items[idx].memallocated = 0.0; items[idx].maxMemUsed = 0; + // Threshold color coding + items[idx].cpunotificationthreshold = 0.0; + items[idx].cpudisablethreshold = 0.0; + items[idx].memnotificationthreshold = 0.0; + items[idx].memdisablethreshold = 0.0; + $.ajax({ url: createURL('listClusters'), data: {zoneid: zone.id},