cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pran...@apache.org
Subject git commit: updated refs/heads/master to d91b0f2
Date Thu, 02 May 2013 12:54:07 GMT
Updated Branches:
  refs/heads/master 61f3f931d -> d91b0f2f6


CLOUDSTACK-2041:Granular global parameter- Cluster settings


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d91b0f2f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d91b0f2f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d91b0f2f

Branch: refs/heads/master
Commit: d91b0f2f6d5359f168ea5b4b940afaa682049e3d
Parents: 61f3f93
Author: Pranav Saxena <pranav.saxena@citrix.com>
Authored: Thu May 2 18:23:35 2013 +0530
Committer: Pranav Saxena <pranav.saxena@citrix.com>
Committed: Thu May 2 18:23:35 2013 +0530

----------------------------------------------------------------------
 ui/scripts/system.js |   46 +++++++++++++++++++++++++++++++++++++-------
 1 files changed, 38 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d91b0f2f/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 0b5b3bc..8a28738 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -9149,20 +9149,50 @@
 
               // Granular settings for cluster
               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&clusterid=' + args.context.clusters[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 updateClusterLevelParameters
-                      args.response.success();
+
+                       var data = {
+                                 name: args.data.jsonObj.name,
+                                 value: args.data.value
+                                     };
+
+                          $.ajax({
+                          url:createURL('updateConfiguration&clusterid=' + args.context.clusters[0].id),
+                          data:data,
+                          success:function(json){
+                              var item = json.updateconfigurationresponse.configuration;
+                              args.response.success({data:item});
+                            },
+
+                          error: function(json) {
+                             args.response.error(parseXMLHttpResponse(json));
+                            }
+
+                           });
+
                     }
                   }
                 })


Mime
View raw message