Display ip addresses in 'BMC information' section
BMC Host/IP Address is already displayed in the header.
So in the 'BMC information' section, just display the
BMC's ip addresses. There could be multiple ip addresses.
Resolves openbmc/openbmc#3148
Change-Id: I4efdf4f1df2fc70d32dd659ae57b6bb7ba0fa0f4
Signed-off-by: CamVan Nguyen <ctnguyen@us.ibm.com>
diff --git a/app/common/services/api-utils.js b/app/common/services/api-utils.js
index fcd873c..5f4b931 100644
--- a/app/common/services/api-utils.js
+++ b/app/common/services/api-utils.js
@@ -91,8 +91,9 @@
function parseNetworkData(content){
var data = {
interface_ids: [],
- interfaces: {
- }
+ interfaces: {},
+ ip_addresses: {ipv4 : [],
+ ipv6 : []},
};
var interfaceId = '', keyParts = [], interfaceHash = '', interfaceType = '';
for(var key in content.data){
@@ -131,6 +132,7 @@
if(data.interfaces[interfaceId][interfaceType].ids.indexOf(interfaceHash) == -1){
data.interfaces[interfaceId][interfaceType].ids.push(interfaceHash);
data.interfaces[interfaceId][interfaceType].values.push(content.data[key]);
+ data.ip_addresses[interfaceType].push(content.data[key]['Address']);
}
}
}