mirror of https://github.com/apache/cloudstack.git
metrics: threshold coloring no needed for instances
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
7b912ca4e7
commit
1d1b7401da
|
|
@ -807,43 +807,6 @@
|
|||
items[idx][uiKey] = 'N/A';
|
||||
}
|
||||
}
|
||||
|
||||
// Threshold color coding
|
||||
items[idx].cpunotificationthreshold = 75.0;
|
||||
items[idx].cpudisablethreshold = 95.0;
|
||||
items[idx].memnotificationthreshold = 75.0;
|
||||
items[idx].memdisablethreshold = 95.0;
|
||||
|
||||
$.ajax({
|
||||
url: createURL('listConfigurations'),
|
||||
data: {zoneid: vm.zoneid, listAll: true},
|
||||
success: function(json) {
|
||||
if (json.listconfigurationsresponse && json.listconfigurationsresponse.configuration) {
|
||||
$.each(json.listconfigurationsresponse.configuration, function(i, config) {
|
||||
switch (config.name) {
|
||||
case 'cluster.cpu.allocated.capacity.disablethreshold':
|
||||
items[idx].cpudisablethreshold = parseFloat(config.value) * items[idx].cputotal;
|
||||
break;
|
||||
case 'cluster.cpu.allocated.capacity.notificationthreshold':
|
||||
items[idx].cpunotificationthreshold = parseFloat(config.value) * items[idx].cputotal;
|
||||
break;
|
||||
case 'cluster.memory.allocated.capacity.disablethreshold':
|
||||
items[idx].memdisablethreshold = parseFloat(config.value) * parseFloat(items[idx].memtotal);
|
||||
break;
|
||||
case 'cluster.memory.allocated.capacity.notificationthreshold':
|
||||
items[idx].memnotificationthreshold = parseFloat(config.value) * parseFloat(items[idx].memtotal);
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
async: false
|
||||
});
|
||||
});
|
||||
}
|
||||
args.response.success({
|
||||
data: items
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue