Skip to content

Commit 23f4b7a

Browse files
committed
ui: fix enable static nat only towards primary interface and not on any other interface
1 parent 9ff819d commit 23f4b7a

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

ui/scripts/network.js

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,21 @@
8787

8888
} else { //non-portable IP which has only one NIC
8989
// Get NIC IPs
90+
var data = {
91+
virtualmachineid: instance.id,
92+
};
93+
if (args.context.networkid != undefined) {
94+
$.extend(data, {
95+
networkid: args.context.networkid
96+
});
97+
} else {
98+
$.extend(data, {
99+
networkid: network.id
100+
});
101+
}
90102
$.ajax({
91103
url: createURL('listNics'),
92-
data: {
93-
virtualmachineid: instance.id,
94-
networkId: network.id
95-
},
104+
data: data,
96105
success: function(json) {
97106
var nic = json.listnicsresponse.nic[0];
98107
var primaryIp = nic.ipaddress;
@@ -2465,6 +2474,10 @@
24652474
networkid: $tierSelect.val(),
24662475
vpcid: args.context.vpc[0].id
24672476
});
2477+
$.extend(args.context, {
2478+
networkid: $tierSelect.val(),
2479+
vpcid: args.context.vpc[0].id
2480+
});
24682481
} else if ('networks' in args.context && !args.context.ipAddresses[0].isportable) {
24692482
$.extend(data, {
24702483
networkid: args.context.networks[0].id

0 commit comments

Comments
 (0)