mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
ui: fix enable static nat only towards first nic and not on any other interface (#3338)
When enable static nat in a vpc on UI, it only lists the primary and secondary ips of first nic of a vm, no matter which vpc tier is selected. The same issue happens when add a vm to load balancer. Fixes #3334
This commit is contained in:
parent
f1efcc1af6
commit
f6f381fc68
@ -91,7 +91,7 @@
|
||||
url: createURL('listNics'),
|
||||
data: {
|
||||
virtualmachineid: instance.id,
|
||||
networkId: network.id
|
||||
networkid: (args.context.networkid != undefined) ? args.context.networkid : network.id
|
||||
},
|
||||
success: function(json) {
|
||||
var nic = json.listnicsresponse.nic[0];
|
||||
@ -2465,6 +2465,10 @@
|
||||
networkid: $tierSelect.val(),
|
||||
vpcid: args.context.vpc[0].id
|
||||
});
|
||||
$.extend(args.context, {
|
||||
networkid: $tierSelect.val(),
|
||||
vpcid: args.context.vpc[0].id
|
||||
});
|
||||
} else if ('networks' in args.context && !args.context.ipAddresses[0].isportable) {
|
||||
$.extend(data, {
|
||||
networkid: args.context.networks[0].id
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
url: createURL('listNics'),
|
||||
data: {
|
||||
virtualmachineid: instance.id,
|
||||
nicId: instance.nic[0].id
|
||||
networkId: network.id
|
||||
},
|
||||
success: function(json) {
|
||||
var nic = json.listnicsresponse.nic[0];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user