You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/05/02 19:31:51 UTC
[45/50] git commit: updated refs/heads/ui-cisco-asa1000v-support to
ac07a54
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/ui-cisco-asa1000v-support
Commit: 22a5c6d4b3fa3ba5ec883b930785365fbcce97cd
Parents: d91b0f2
Author: Pranav Saxena <pr...@citrix.com>
Authored: Thu May 2 20:06:20 2013 +0530
Committer: Pranav Saxena <pr...@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));
+ }
+
+ });
+
}
}
})