From 86fee33b41f243f08d724378823cd481a54ba822 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 17 Jul 2012 16:40:06 -0700 Subject: [PATCH] cloudstack 3.0 UI - bypass an error caused by "listPublicIpAddresses&id=N" API until it is fixed to correctly return a record. --- ui/scripts/network.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/scripts/network.js b/ui/scripts/network.js index 258f814b548..b323b7dec1a 100644 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -2547,7 +2547,9 @@ listAll: true }, success: function(json) { - var item = json.listpublicipaddressesresponse.publicipaddress[0]; + //var item = json.listpublicipaddressesresponse.publicipaddress[0]; //uncomment this line and delete the following line when "listPublicIpAddresses&id=N" is fixed to return a record. + var item = args.context.ipAddresses[0]; + args.context.ipAddresses.shift(); //remove the first element in args.context.ipAddresses args.context.ipAddresses.push(item); @@ -2825,7 +2827,9 @@ listAll: true }, success: function(json) { - var item = json.listpublicipaddressesresponse.publicipaddress[0]; + //var item = json.listpublicipaddressesresponse.publicipaddress[0]; //uncomment this line and delete the following line when "listPublicIpAddresses&id=N" is fixed to return a record. + var item = args.context.ipAddresses[0]; + args.context.ipAddresses.shift(); //remove the first element in args.context.ipAddresses args.context.ipAddresses.push(item);