Skip to content

Commit d91b0f2

Browse files
committed
CLOUDSTACK-2041:Granular global parameter- Cluster settings
1 parent 61f3f93 commit d91b0f2

1 file changed

Lines changed: 38 additions & 8 deletions

File tree

‎ui/scripts/system.js‎

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9149,20 +9149,50 @@
91499149

91509150
// Granular settings for cluster
91519151
settings: {
9152-
title: 'label.menu.global.settings',
9152+
title: 'Settings',
91539153
custom: cloudStack.uiCustom.granularSettings({
91549154
dataProvider: function(args) {
9155-
args.response.success({
9156-
data: [
9157-
{ name: 'config.param.1', value: 1 },
9158-
{ name: 'config.param.2', value: 2 }
9159-
]
9160-
});
9155+
$.ajax({
9156+
url:createURL('listConfigurations&clusterid=' + args.context.clusters[0].id),
9157+
data: { page: args.page, pageSize: pageSize, listAll: true },
9158+
success:function(json){
9159+
args.response.success({
9160+
data:json.listconfigurationsresponse.configuration
9161+
9162+
});
9163+
9164+
},
9165+
9166+
error:function(json){
9167+
args.response.error(parseXMLHttpResponse(json));
9168+
9169+
}
9170+
});
9171+
91619172
},
91629173
actions: {
91639174
edit: function(args) {
91649175
// call updateClusterLevelParameters
9165-
args.response.success();
9176+
9177+
var data = {
9178+
name: args.data.jsonObj.name,
9179+
value: args.data.value
9180+
};
9181+
9182+
$.ajax({
9183+
url:createURL('updateConfiguration&clusterid=' + args.context.clusters[0].id),
9184+
data:data,
9185+
success:function(json){
9186+
var item = json.updateconfigurationresponse.configuration;
9187+
args.response.success({data:item});
9188+
},
9189+
9190+
error: function(json) {
9191+
args.response.error(parseXMLHttpResponse(json));
9192+
}
9193+
9194+
});
9195+
91669196
}
91679197
}
91689198
})

0 commit comments

Comments
 (0)