Updated Branches: refs/heads/master bfe05acd9 -> 5a525211d
CLOUDSTACK-2782: UI - Infrastructure menu - zone detail page - implement Remove VMWare DC action. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5a525211 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5a525211 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5a525211 Branch: refs/heads/master Commit: 5a525211de4da25fd89084b391357109688bbcca Parents: bfe05ac Author: Jessica Wang <[email protected]> Authored: Mon Jun 3 16:37:38 2013 -0700 Committer: Jessica Wang <[email protected]> Committed: Mon Jun 3 16:37:38 2013 -0700 ---------------------------------------------------------------------- ui/scripts/system.js | 42 ++++++++++++++++++++++++++++++++++++++---- 1 files changed, 38 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a525211/ui/scripts/system.js ---------------------------------------------------------------------- diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 0bdb5b8..7683662 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -5375,14 +5375,14 @@ isMaximized: true, actions: { addVmwareDc: { - label: 'Adds a VMware datacenter', + label: 'Add VMware datacenter', messages: { notification: function(args) { - return 'Adds a VMware datacenter'; + return 'Add VMware datacenter'; } }, createForm: { - title: 'Adds a VMware datacenter', + title: 'Add VMware datacenter', fields: { name: { label: 'label.name', @@ -5440,7 +5440,40 @@ } } }, - + + removeVmwareDc: { + label: 'Remove VMware datacenter', + messages: { + confirm: function(args) { + return 'Please confirm you want to remove VMware datacenter'; + }, + notification: function(args) { + return 'Remove VMware datacenter'; + } + }, + action: function(args) { + var data = { + zoneid: args.context.physicalResources[0].id + }; + $.ajax({ + url: createURL('removeVmwareDc'), + data: data, + success: function(json) { + var item = json.updatezoneresponse.zone; + args.response.success({ + actionFilter: zoneActionfilter, + data:item + }); + } + }); + }, + notification: { + poll: function(args) { + args.complete(); + } + } + }, + enable: { label: 'label.action.enable.zone', messages: { @@ -13272,6 +13305,7 @@ var allowedActions = ['enableSwift']; allowedActions.push('addVmwareDc'); + allowedActions.push('removeVmwareDc'); if(jsonObj.domainid != null) allowedActions.push("release");
