CS-15916: Show network name in IP details

Conflicts:
	ui/scripts/network.js
This commit is contained in:
Brian Federle 2012-08-09 11:43:01 -07:00
parent 1fd771f871
commit e986d03fc9
1 changed files with 18 additions and 8 deletions

View File

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