Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2EED2FEC5 for ; Thu, 2 May 2013 17:31:13 +0000 (UTC) Received: (qmail 94249 invoked by uid 500); 2 May 2013 17:31:09 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 94196 invoked by uid 500); 2 May 2013 17:31:09 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 93354 invoked by uid 99); 2 May 2013 17:31:08 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 May 2013 17:31:08 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B27E88261AB; Thu, 2 May 2013 17:31:08 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bfederle@apache.org To: commits@cloudstack.apache.org Date: Thu, 02 May 2013 17:31:50 -0000 Message-Id: In-Reply-To: <67802977535549f99258d2d06cef174c@git.apache.org> References: <67802977535549f99258d2d06cef174c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [44/50] git commit: updated refs/heads/ui-cisco-asa1000v-support to ac07a54 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/ui-cisco-asa1000v-support Commit: d91b0f2f6d5359f168ea5b4b940afaa682049e3d Parents: 61f3f93 Author: Pranav Saxena Authored: Thu May 2 18:23:35 2013 +0530 Committer: Pranav Saxena 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)); + } + + }); + } } })