From 560fa52fdcef75df3c8baed69c8610659c1fd1a5 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 28 May 2013 15:57:14 -0700 Subject: [PATCH] CLOUDSTACK-2678: portable IP ranges - Associate IP Address - pop up a dialog that have cross zone dropdown (yes/no) and send selected option to API call. --- ui/scripts/network.js | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/ui/scripts/network.js b/ui/scripts/network.js index 0ffaa1dce2f..d66ec839dd6 100755 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -1755,18 +1755,36 @@ } }, messages: { + /* confirm: function(args) { if(args.context.vpc) return 'message.acquire.new.ip.vpc'; else return 'message.acquire.new.ip'; }, + */ notification: function(args) { return 'label.acquire.new.ip'; } - }, + }, + createForm: { + title: 'label.acquire.new.ip', + fields: { + isportable: { + label: 'label.cross.zones', + select: function(args) { + var items = []; + items.push({ id: "false", description: _l('label.no') }); + items.push({ id: "true", description: _l('label.yes') }); + args.response.success({data: items}); + } + } + } + }, action: function(args) { - var dataObj = {}; + var dataObj = { + isportable: args.data.isportable + }; if('vpc' in args.context) { //from VPC section $.extend(dataObj, { vpcid: args.context.vpc[0].id @@ -2299,6 +2317,12 @@ ipaddress: { label: 'label.ip' } }, { + isportable: { + label: 'label.cross.zones', + converter: function(data) { + return data ? _l('label.yes') : _l('label.no'); + } + }, id: { label: 'label.id' }, associatednetworkid: { label: 'label.associated.network.id' }, networkname: { label: 'label.associated.network' },