metrics: work in progress cluster resource metrics view

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2015-09-18 12:54:21 +05:30
parent 4643e5609d
commit 218468b8c1
1 changed files with 27 additions and 2 deletions

View File

@ -40,8 +40,19 @@
name: {
label: 'label.name'
},
state: {
label: 'label.state'
allocationstate: {
label: 'label.state',
converter: function (str) {
// For localization
return str;
},
indicator: {
'Enabled': 'on',
'Destroyed': 'off'
}
},
hosts: {
label: 'label.hosts'
},
cpuavg: {
label: 'Avg CPU Used'
@ -70,6 +81,20 @@
},
dataProvider: function(args) {
console.log(args);
var data = {};
listViewDataProvider(args, data);
$.ajax({
url: createURL('listClusters'),
data: data,
success: function(json) {
var items = json.listclustersresponse.cluster;
console.log(items);
args.response.success({
data: items
});
}
});
},
refreshMetrics: function() {
console.log("Refreshing Cluster metrics");