Skip to content

Commit c190b05

Browse files
committed
CLOUDSTACK-2185: Allow custom 'ipaddr' argument when creating NIC IP
1 parent 9f564fc commit c190b05

1 file changed

Lines changed: 15 additions & 7 deletions

File tree

ui/scripts/network.js

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,22 +1549,30 @@
15491549
add: {
15501550
label: 'label.acquire.new.ip',
15511551
addRow: 'true',
1552+
createForm: {
1553+
title: 'label.acquire.new.ip',
1554+
desc: 'message.acquire.new.ip',
1555+
fields: {
1556+
ipaddr: { label: 'label.ip.address' }
1557+
}
1558+
},
15521559
messages: {
1553-
confirm: function(args) {
1554-
return 'message.acquire.new.ip';
1555-
},
15561560
notification: function(args) {
15571561
return 'label.acquire.new.ip';
15581562
}
15591563
},
15601564
action: function(args) {
1561-
var dataObj = {};
1565+
var dataObj = {
1566+
nicId: args.context.nics[0].id
1567+
};
1568+
1569+
if (args.data.ipaddr) {
1570+
dataObj.ipaddr = args.data.ipaddr;
1571+
}
15621572

15631573
$.ajax({
15641574
url: createURL('addIpToNic'),
1565-
data: {
1566-
nicId: args.context.nics[0].id
1567-
},
1575+
data: dataObj,
15681576
success: function(json) {
15691577
args.response.success({
15701578
_custom: {

0 commit comments

Comments
 (0)