From 1ad532f57eee8358d74866e577669e2394d97c7d Mon Sep 17 00:00:00 2001 From: Brian Federle Date: Thu, 1 May 2014 13:13:28 -0700 Subject: [PATCH] CLOUDSTACK-6438: WIP: If VM has additional IPs, keep showing in add screen --- ui/scripts/network.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ui/scripts/network.js b/ui/scripts/network.js index f0141b6efdd..10d5a05e581 100755 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -3380,6 +3380,28 @@ return item.id == instance.id; }).length; + // Check if there are any remaining IPs + if (!notExisting) { + $.ajax({ + url: createURL('listNics'), + async: false, + data: { + virtualmachineid: instance.id + }, + success: function(json) { + var nics = json.listnicsresponse.nic; + + $(nics).map(function (index, nic) { + if (nic.secondaryip) { + notExisting = true; + + return false; + } + }); + } + }) + } + return nonAutoScale && isActiveState && notExisting; } );