CLOUDSTACK-4662: UI > Network > IP Address > select a portable IP Address > Port Forwarding > VM grid - select a VM - dropdown of VM NIC IP appears - dropdown option value is networkID + VmGuestIp, split it and pass only VmGuestIp to API call.

This commit is contained in:
Jessica Wang 2013-09-12 19:11:13 -07:00
parent a096c96672
commit cae8b39b43
1 changed files with 12 additions and 2 deletions

View File

@ -3842,10 +3842,20 @@
virtualmachineid: args.itemData[0].id,
openfirewall: false
};
if (args.context.ipAddresses[0].isportable) {
var subselect = args.itemData[0]._subselect.split(',');
//var networkid = subselect[0];
var vmguestip = subselect[1];
if (args.itemData[0]._subselect && args.itemData[0]._subselect != -1) {
//data.networkid = networkid;
if (parseInt(vmguestip) !== -1) {
data.vmguestip = vmguestip;
}
} else if (args.itemData[0]._subselect && args.itemData[0]._subselect != -1) {
data.vmguestip = args.itemData[0]._subselect;
}
}
if ('vpc' in args.context) { //from VPC section
if (args.data.tier == null) {