Repository: cloudstack
Updated Branches:
  refs/heads/4.4-forward 6435b261d -> 430d14b67


CLOUDSTACK-6438: WIP: If VM has additional IPs, keep showing in add screen


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0b03609c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0b03609c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0b03609c

Branch: refs/heads/4.4-forward
Commit: 0b03609c45ecb5b4525e6a7b5216c70032d94a39
Parents: 6435b26
Author: Brian Federle <[email protected]>
Authored: Thu May 1 13:13:28 2014 -0700
Committer: Brian Federle <[email protected]>
Committed: Thu May 1 15:49:28 2014 -0700

----------------------------------------------------------------------
 ui/scripts/network.js | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0b03609c/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index f0141b6..10d5a05 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;
                                                                 }
                                                             );

Reply via email to