CLOUDSTACK-2041:Granular global parameter- Storage Pool granular settings

This commit is contained in:
Pranav Saxena 2013-05-03 11:16:15 +05:30
parent 4a40f3f6da
commit 324b4f680c
1 changed files with 38 additions and 8 deletions

View File

@ -10820,20 +10820,50 @@
// Granular settings for storage pool
settings: {
title: 'label.menu.global.settings',
title: 'Settings',
custom: cloudStack.uiCustom.granularSettings({
dataProvider: function(args) {
args.response.success({
data: [
{ name: 'config.param.1', value: 1 },
{ name: 'config.param.2', value: 2 }
]
});
$.ajax({
url:createURL('listConfigurations&storageid=' + args.context.primarystorages[0].id),
data: { page: args.page, pageSize: pageSize, listAll: true },
success:function(json){
args.response.success({
data:json.listconfigurationsresponse.configuration
});
},
error:function(json){
args.response.error(parseXMLHttpResponse(json));
}
});
},
actions: {
edit: function(args) {
// call updateStorageLevelParameters
args.response.success();
var data = {
name: args.data.jsonObj.name,
value: args.data.value
};
$.ajax({
url:createURL('updateConfiguration&storageid=' + args.context.primarystorages[0].id),
data:data,
success:function(json){
var item = json.updatestoragelevelparameterresponse.configuration;
args.response.success({data:item});
},
error: function(json) {
args.response.error(parseXMLHttpResponse(json));
}
});
}
}
})