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 C4CACFF2E for ; Wed, 5 Nov 2014 10:45:02 +0000 (UTC) Received: (qmail 48560 invoked by uid 500); 5 Nov 2014 10:44:56 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 48486 invoked by uid 500); 5 Nov 2014 10:44:56 -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 48090 invoked by uid 99); 5 Nov 2014 10:44:56 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Nov 2014 10:44:56 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 6D389A0A243; Wed, 5 Nov 2014 10:44:56 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rajani@apache.org To: commits@cloudstack.apache.org Date: Wed, 05 Nov 2014 10:45:15 -0000 Message-Id: In-Reply-To: <05c6863fb3b34541b89505ec934bced5@git.apache.org> References: <05c6863fb3b34541b89505ec934bced5@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [21/50] [abbrv] git commit: updated refs/heads/master to 4c5f792 CLOUDSTACK-7816: UI > Global Settings > add "Baremetal Rack Configuration" section. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b7010615 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b7010615 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b7010615 Branch: refs/heads/master Commit: b70106158c2c0e3315704a8843c7ed455282f023 Parents: 1681b02 Author: Jessica Wang Authored: Thu Oct 30 11:27:38 2014 -0700 Committer: Jessica Wang Committed: Thu Oct 30 11:27:38 2014 -0700 ---------------------------------------------------------------------- ui/scripts/globalSettings.js | 135 +++++++++++++++++++++++++++++++++++++- 1 file changed, 134 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b7010615/ui/scripts/globalSettings.js ---------------------------------------------------------------------- diff --git a/ui/scripts/globalSettings.js b/ui/scripts/globalSettings.js index 4cbfd07..34d65a2 100644 --- a/ui/scripts/globalSettings.js +++ b/ui/scripts/globalSettings.js @@ -234,7 +234,140 @@ } } } - }, + }, + baremetalRct: { + type: 'select', + title: 'Baremetal Rack Configuration', + listView: { + id: 'baremetalRct', + label: 'Baremetal Rack Configuration', + fields: { + id: { + label: 'label.id' + }, + url: { + label: 'label.url' + } + }, + dataProvider: function(args) { + var data = {}; + listViewDataProvider(args, data); + + $.ajax({ + url: createURL("listBaremetalRct"), + data: data, + success: function(json) { + args.response.success({ data: json.listbaremetalrctresponse.baremetalrct }); + } + }); + }, + actions: { + add: { + label: 'Add Baremetal Rack Configuration', + messages: { + notification: function(args) { + return 'Add Baremetal Rack Configuration'; + } + }, + createForm: { + title: 'Add Baremetal Rack Configuration', + fields: { + url: { + label: 'label.url', + validation: { + required: true + } + } + } + }, + action: function(args) { + $.ajax({ + url: createURL("addBaremetalRct"), + data: { + baremetalrcturl: args.data.url + }, + success: function(json) { + var jid = json.addbaremetalrctresponse.jobid + args.response.success({ + _custom: { + jobId: jid, + getUpdatedItem: function(json) { + return json.queryasyncjobresultresponse.jobresult.baremetalrct; + } + } + }); + } + }); + }, + notification: { + poll: pollAsyncJobResult + } + } + }, + + detailView: { + name: "details", + actions: { + remove: { + label: 'Delete Baremetal Rack Configuration', + messages: { + confirm: function(args) { + return 'Please confirm that you want to delete Baremetal Rack Configuration.'; + }, + notification: function(args) { + return 'Delete Baremetal Rack Configuration'; + } + }, + action: function(args) { + var data = { + id: args.context.baremetalRct[0].id + }; + $.ajax({ + url: createURL('deleteBaremetalRct'), + data: data, + success: function(json) { + var jid = json.deletebaremetalrctresponse.jobid; + args.response.success({ + _custom: { + jobId: jid + } + }); + } + }); + }, + notification: { + poll: pollAsyncJobResult + } + } + }, + tabs: { + details: { + title: 'label.details', + fields: [{ + id: { + label: 'label.id' + }, + url: { + label: 'label.url' + } + }], + dataProvider: function(args) { + var data = { + id: args.context.baremetalRct[0].id + }; + $.ajax({ + url: createURL("listBaremetalRct"), + data: data, + success: function(json) { + args.response.success({ data: json.listbaremetalrctresponse.baremetalrct[0] }); + } + }); + } + } + } + } + } + }, hypervisorCapabilities: { type: 'select', title: 'label.hypervisor.capabilities',