Skip to content

Commit 560fa52

Browse files
author
Jessica Wang
committed
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.
1 parent f2c468d commit 560fa52

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

‎ui/scripts/network.js‎

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1755,18 +1755,36 @@
17551755
}
17561756
},
17571757
messages: {
1758+
/*
17581759
confirm: function(args) {
17591760
if(args.context.vpc)
17601761
return 'message.acquire.new.ip.vpc';
17611762
else
17621763
return 'message.acquire.new.ip';
17631764
},
1765+
*/
17641766
notification: function(args) {
17651767
return 'label.acquire.new.ip';
17661768
}
1767-
},
1769+
},
1770+
createForm: {
1771+
title: 'label.acquire.new.ip',
1772+
fields: {
1773+
isportable: {
1774+
label: 'label.cross.zones',
1775+
select: function(args) {
1776+
var items = [];
1777+
items.push({ id: "false", description: _l('label.no') });
1778+
items.push({ id: "true", description: _l('label.yes') });
1779+
args.response.success({data: items});
1780+
}
1781+
}
1782+
}
1783+
},
17681784
action: function(args) {
1769-
var dataObj = {};
1785+
var dataObj = {
1786+
isportable: args.data.isportable
1787+
};
17701788
if('vpc' in args.context) { //from VPC section
17711789
$.extend(dataObj, {
17721790
vpcid: args.context.vpc[0].id
@@ -2299,6 +2317,12 @@
22992317
ipaddress: { label: 'label.ip' }
23002318
},
23012319
{
2320+
isportable: {
2321+
label: 'label.cross.zones',
2322+
converter: function(data) {
2323+
return data ? _l('label.yes') : _l('label.no');
2324+
}
2325+
},
23022326
id: { label: 'label.id' },
23032327
associatednetworkid: { label: 'label.associated.network.id' },
23042328
networkname: { label: 'label.associated.network' },

0 commit comments

Comments
 (0)