diff --git a/ui/scripts/network.js b/ui/scripts/network.js index b323b7dec1a..baea2eec9a2 100644 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -1623,8 +1623,8 @@ }, dataType: "json", async: true, - success: function(json) { - var ipObj = items[0]; //because json.listpublicipaddressesresponse.publicipaddress is null (API bug). Use old info here until API is fixed. + success: function(json) { + var ipObj = json.listpublicipaddressesresponse.publicipaddress[0]; if('networks' in args.context) { //from Guest Network section //get ipObj.networkOfferingConserveMode and ipObj.networkOfferingHavingVpnService from guest network's network offering @@ -1966,7 +1966,8 @@ $.ajax({ url: createURL('listPublicIpAddresses'), data: { - id: args.context.ipAddresses[0].id + id: args.context.ipAddresses[0].id, + listAll: true }, dataType: 'json', async: true, @@ -2547,8 +2548,7 @@ listAll: true }, success: function(json) { - //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]; + var item = json.listpublicipaddressesresponse.publicipaddress[0]; args.context.ipAddresses.shift(); //remove the first element in args.context.ipAddresses args.context.ipAddresses.push(item); @@ -2827,8 +2827,7 @@ listAll: true }, success: function(json) { - //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]; + var item = json.listpublicipaddressesresponse.publicipaddress[0]; args.context.ipAddresses.shift(); //remove the first element in args.context.ipAddresses args.context.ipAddresses.push(item);