You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ki...@apache.org on 2013/05/03 15:15:15 UTC
[33/50] [abbrv] git commit: updated refs/heads/network_acl to 1609d01
CLOUDSTACK-2041:Granular global parameter- Storage Pool granular settings
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/324b4f68
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/324b4f68
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/324b4f68
Branch: refs/heads/network_acl
Commit: 324b4f680ca6632e1762079859ef696824ee0bef
Parents: 4a40f3f
Author: Pranav Saxena <pr...@citrix.com>
Authored: Fri May 3 11:16:15 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Fri May 3 11:16:15 2013 +0530
----------------------------------------------------------------------
ui/scripts/system.js | 46 +++++++++++++++++++++++++++++++++++++-------
1 files changed, 38 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/324b4f68/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index b6e3bd1..65889b3 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -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));
+ }
+
+ });
+
}
}
})