mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
bug 13112: cloudstack 3.0 UI - host page - add Statistics tab.
This commit is contained in:
parent
078cd90ad9
commit
64a61f5ccb
@ -5655,7 +5655,36 @@
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
stats: {
|
||||
title: 'label.statistics',
|
||||
fields: {
|
||||
totalCPU: { label: 'label.total.cpu' },
|
||||
cpuused: { label: 'label.cpu.utilized' },
|
||||
cpuallocated: { label: 'label.cpu.allocated.for.VMs' },
|
||||
memorytotal: { label: 'label.memory.total' },
|
||||
memoryallocated: { label: 'label.memory.allocated' },
|
||||
memoryused: { label: 'label.memory.used' },
|
||||
networkkbsread: { label: 'label.network.read' },
|
||||
networkkbswrite: { label: 'label.network.write' }
|
||||
},
|
||||
dataProvider: function(args) {
|
||||
var jsonObj = args.context.hosts[0];
|
||||
args.response.success({
|
||||
data: {
|
||||
totalCPU: fromdb(jsonObj.cpunumber) + " x " + cloudStack.converters.convertHz(jsonObj.cpuspeed),
|
||||
cpuused: jsonObj.cpuused,
|
||||
cpuallocated: (jsonObj.cpuallocated == null || jsonObj.cpuallocated == 0)? "N/A": jsonObj.cpuallocated,
|
||||
memorytotal: (jsonObj.memorytotal == null || jsonObj.memorytotal == 0)? "N/A": cloudStack.converters.convertBytes(jsonObj.memorytotal * 1024),
|
||||
memoryallocated: (jsonObj.memoryallocated == null || jsonObj.memoryallocated == 0)? "N/A": cloudStack.converters.convertBytes(jsonObj.memoryallocated * 1024),
|
||||
memoryused: (jsonObj.memoryused == null || jsonObj.memoryused == 0)? "N/A": cloudStack.converters.convertBytes(jsonObj.memoryused * 1024),
|
||||
networkkbsread: (jsonObj.networkkbsread == null || jsonObj.networkkbsread == 0)? "N/A": cloudStack.converters.convertBytes(jsonObj.networkkbsread * 1024),
|
||||
networkkbswrite: (jsonObj.networkkbswrite == null || jsonObj.networkkbswrite == 0)? "N/A": cloudStack.converters.convertBytes(jsonObj.networkkbswrite * 1024)
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user