diff --git a/ui/scripts/network.js b/ui/scripts/network.js index 803ca1fda7c..20fee4fd822 100644 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -1658,7 +1658,8 @@ ipaddress: { label: 'IP' } }, { - id: { label: 'label.id' }, + id: { label: 'label.id' }, + networkname: { label: 'label.network.name' }, networkid: { label: 'label.network.id' }, associatednetworkid: { label: 'label.associated.network.id' }, state: { label: 'label.state' }, @@ -1688,14 +1689,23 @@ }, dataType: "json", async: true, - success: function(json) { - var ipObj = json.listpublicipaddressesresponse.publicipaddress[0]; - getExtaPropertiesForIpObj(ipObj, args); - + success: function(json) { + var ipObj = json.listpublicipaddressesresponse.publicipaddress[0]; + getExtaPropertiesForIpObj(ipObj, args); + + var network = $.grep( + args.context.vpc ? + args.context.vpc[0].network : args.context.networks, + function(network) { + return network.id = ipObj.networkid; + })[0]; + args.response.success({ - actionFilter: actionFilters.ipAddress, - data: ipObj - }); + actionFilter: actionFilters.ipAddress, + data: $.extend(ipObj, { + networkname: network.name + }) + }); }, error: function(data) { args.response.error(parseXMLHttpResponse(data));