summaryrefslogtreecommitdiffstats
path: root/app/common
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2019-09-19 16:04:46 -0500
committerGunnar Mills <gmills@us.ibm.com>2019-09-24 14:15:52 +0000
commit5ccf9e36c1da9b6396288c3cfe8d32dddfbb1a10 (patch)
treedf0f91fc78f14bf0571e9208fafd53e56ba8a9ce /app/common
parent7d349d04d987e8f68baa261ab4d87a8365197582 (diff)
downloadphosphor-webui-5ccf9e36c1da9b6396288c3cfe8d32dddfbb1a10.tar.gz
phosphor-webui-5ccf9e36c1da9b6396288c3cfe8d32dddfbb1a10.zip
Remove Purpose property from inventory item
The Purpose property is not useful in the inventory item. The field overflows to another line. The Purpose property under a power supply inventory item: PURPOSE xyz.openbmc_project.Software.Version.VersionPurpose.Other When we move to Redfish, this can be removed. An alternatives considered was only using the last part of the purpose property (e.g. Other). Still didn not find this userful to customers so just removed. https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Software/Version.interface.yaml#L14 Tested: Built and loaded on a Witherspoon. Don't see the property. Change-Id: Ie004c90f6a5e625cfa65ba39ab2be97e5e256705 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Diffstat (limited to 'app/common')
-rw-r--r--app/common/services/api-utils.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/common/services/api-utils.js b/app/common/services/api-utils.js
index ebc2956..51da8bb 100644
--- a/app/common/services/api-utils.js
+++ b/app/common/services/api-utils.js
@@ -1531,6 +1531,16 @@ window.angular && (function(angular) {
delete content.data[key].associations;
}
+ // Remove the Purpose property from any inventory item.
+ // The purpose property isn't useful to a user.
+ // E.g. in a Power Supply:
+ // Purpose
+ // xyz.openbmc_project.Software.Version.VersionPurpose.Other
+ // Remove when we move inventory to Redfish
+ if (content.data[key].hasOwnProperty('Purpose')) {
+ delete content.data[key].Purpose;
+ }
+
data = camelcaseToLabel(content.data[key]);
searchText = getSearchText(data);
title = key.split('/').pop();
OpenPOWER on IntegriCloud