From 459d6380b8b0fe7a8437df3c137b7ae5db4cddd3 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Sat, 7 Nov 2015 16:50:08 +0530 Subject: [PATCH] CLOUDSTACK-9020: add ipaddress in instances view Signed-off-by: Rohit Yadav --- ui/scripts/instances.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index 8e21c819d8c..2b7576cd1f2 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -170,6 +170,9 @@ label: 'label.display.name', truncate: true }, + ipaddress: { + label: 'label.ip.address' + }, zonename: { label: 'label.zone.name' }, @@ -394,6 +397,11 @@ data: data, success: function(json) { var items = json.listvirtualmachinesresponse.virtualmachine; + $.each(items, function(idx, vm) { + if (vm.nic && vm.nic.length > 0 && vm.nic[0].ipaddress) { + items[idx].ipaddress = vm.nic[0].ipaddress; + } + }); args.response.success({ data: items });