You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pr...@apache.org on 2013/05/05 09:59:41 UTC
[16/50] [abbrv] git commit: updated refs/heads/planner_reserve to
9b86516
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/planner_reserve
Commit: d91b0f2f6d5359f168ea5b4b940afaa682049e3d
Parents: 61f3f93
Author: Pranav Saxena <pr...@citrix.com>
Authored: Thu May 2 18:23:35 2013 +0530
Committer: Pranav Saxena <pr...@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));
+ }
+
+ });
+
}
}
})