cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject [30/50] git commit: updated refs/heads/internallb to 1cff609
Date Fri, 03 May 2013 19:51:48 GMT
CLOUDSTACK-2041:Granular global parameter- Account settings


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

Branch: refs/heads/internallb
Commit: 22a5c6d4b3fa3ba5ec883b930785365fbcce97cd
Parents: d91b0f2
Author: Pranav Saxena <pranav.saxena@citrix.com>
Authored: Thu May 2 20:06:20 2013 +0530
Committer: Pranav Saxena <pranav.saxena@citrix.com>
Committed: Thu May 2 20:06:20 2013 +0530

----------------------------------------------------------------------
 ui/scripts/accounts.js |   45 +++++++++++++++++++++++++++++++++++-------
 1 files changed, 37 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/22a5c6d4/ui/scripts/accounts.js
----------------------------------------------------------------------
diff --git a/ui/scripts/accounts.js b/ui/scripts/accounts.js
index 06fc07a..bad8435 100644
--- a/ui/scripts/accounts.js
+++ b/ui/scripts/accounts.js
@@ -900,20 +900,49 @@
 
               // Granular settings for account
               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&accountid=' + args.context.accounts[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 updateAccountLevelParameters
-                      args.response.success();
+                       var data = {
+                                 name: args.data.jsonObj.name,
+                                 value: args.data.value
+                                     };
+
+                          $.ajax({
+                          url:createURL('updateConfiguration&accountid=' + args.context.accounts[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