cloudstack 3.0 UI - bypass an error caused by "listPublicIpAddresses&id=N" API until it is fixed to correctly return a record.

This commit is contained in:
Jessica Wang 2012-07-17 16:40:06 -07:00
parent e1e7780efc
commit 86fee33b41
1 changed files with 6 additions and 2 deletions

View File

@ -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);