You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ah...@apache.org on 2013/05/30 02:04:18 UTC
[24/50] [abbrv] git commit: updated refs/heads/vmsync to cd6aea1
CLOUDSTACK-2678: portable IP ranges - regions menu - Portable IP Ranges - implement Delete Portable IP Range action.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ecc30ddc
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ecc30ddc
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ecc30ddc
Branch: refs/heads/vmsync
Commit: ecc30ddc0dfcd8237c7e9822160b3be207017520
Parents: 78e50c3
Author: Jessica Wang <je...@apache.org>
Authored: Tue May 28 15:18:36 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Tue May 28 15:18:36 2013 -0700
----------------------------------------------------------------------
ui/scripts/regions.js | 94 ++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 91 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ecc30ddc/ui/scripts/regions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/regions.js b/ui/scripts/regions.js
index 5ca4167..b9b6dae 100644
--- a/ui/scripts/regions.js
+++ b/ui/scripts/regions.js
@@ -489,13 +489,11 @@
actions: {
add: {
label: 'Add Portable IP Range',
-
messages: {
notification: function(args) {
return 'Add Portable IP Range';
}
},
-
createForm: {
title: 'Add Portable IP Range',
fields: {
@@ -557,7 +555,97 @@
poll: pollAsyncJobResult
}
}
- }
+ },
+
+ detailView: {
+ name: 'Portable IP Range details',
+ actions: {
+ remove: {
+ label: 'Delete Portable IP Range',
+ messages: {
+ confirm: function(args) {
+ return 'Please confirm you want to delete Portable IP Range';
+ },
+ notification: function(args) {
+ return 'Delete Portable IP Range';
+ }
+ },
+ action: function(args) {
+ var data = {
+ id: args.context.portableIpRanges[0].id
+ };
+ $.ajax({
+ url: createURL('deletePortableIpRange'),
+ data: data,
+ async: true,
+ success: function(json) {
+ var jid = json.deleteportablepublicipresponse.jobid;
+ args.response.success({
+ _custom: {
+ jobId: jid
+ }
+ });
+ },
+ error: function(data) {
+ args.response.error(parseXMLHttpResponse(data));
+ }
+ });
+ },
+ notification: {
+ poll: pollAsyncJobResult
+ }
+ }
+ },
+ tabs: {
+ details: {
+ title: 'label.details',
+ fields: [
+ {
+ id: { label: 'label.id' }
+ },
+ {
+ startip: { label: 'label.start.IP' },
+ endip: { label: 'label.end.IP' },
+ gateway: { label: 'label.gateway' },
+ netmask: { label: 'label.netmask' },
+ vlan: { label: 'label.vlan' },
+ portableipaddress: {
+ label: 'Portable IPs',
+ converter: function(args) {
+ var text1 = '';
+ if(args != null) {
+ for(var i = 0; i < args.length; i++) {
+ if(i > 0) {
+ text1 += ', ';
+ }
+ text1 += args[i].ipaddress;
+ }
+ }
+ return text1;
+ }
+ }
+ }
+ ],
+ dataProvider: function(args) {
+ $.ajax({
+ url: createURL('listPortableIpRanges'),
+ data: {
+ id: args.context.portableIpRanges[0].id
+ },
+ success: function(json) {
+ var item = json.listportableipresponse.portableiprange[0];
+ args.response.success({
+ data: item
+ });
+ },
+ error: function(json) {
+ args.response.error(parseXMLHttpResponse(json));
+ }
+ });
+ }
+ }
+ }
+ }
}
},