metrics: show service offering name in case of root disks

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2015-10-30 13:44:26 +05:30
parent 81ce72982b
commit 2b4707da70
2 changed files with 4 additions and 1 deletions

View File

@ -841,7 +841,7 @@ label.metrics.cpu.usage=CPU Usage
label.metrics.cpu.used.avg=Used
label.metrics.disk=Disk
label.metrics.disk.iops.total=IOPS Total
label.metrics.disk.offering=Disk Offering
label.metrics.disk.offering=Offering
label.metrics.disk.read=Read
label.metrics.disk.size=Size
label.metrics.disk.storagetype=Type

View File

@ -921,6 +921,9 @@
items[idx].state = volume.state;
items[idx].vmname = volume.vmname;
items[idx].diskoffering = volume.diskofferingname;
if (volume.type == 'ROOT') {
items[idx].diskoffering = volume.serviceofferingname;
}
items[idx].disksize = parseFloat(volume.size)/(1024.0*1024.0*1024.0) + ' GB';
items[idx].storagetype = volume.storagetype.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}) + ' (' + volume.type + ')';
if (volume.storage) {