cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sate...@apache.org
Subject [46/50] git commit: updated refs/heads/vmware-datamodel to 2acbe30
Date Fri, 03 May 2013 17:12:14 GMT
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/vmware-datamodel
Commit: 324b4f680ca6632e1762079859ef696824ee0bef
Parents: 4a40f3f
Author: Pranav Saxena <pranav.saxena@citrix.com>
Authored: Fri May 3 11:16:15 2013 +0530
Committer: Pranav Saxena <pranav.saxena@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));
+                            }
+
+                           });
+
                     }
                   }
                 })


Mime
View raw message