summaryrefslogtreecommitdiffstats
path: root/app/common/services
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2019-02-27 10:52:01 -0600
committerGunnar Mills <gmills@us.ibm.com>2019-03-05 22:31:12 +0000
commiteedf0b929ea5e8e0c638ffe569f680b08dc6f6a5 (patch)
treeecfbb06e80ce00ce3bd58f5688237f5f333437b1 /app/common/services
parent6d1d6005abc6cb48144ad5be9cd8fb094f8ff3c2 (diff)
downloadphosphor-webui-eedf0b929ea5e8e0c638ffe569f680b08dc6f6a5.tar.gz
phosphor-webui-eedf0b929ea5e8e0c638ffe569f680b08dc6f6a5.zip
Hardware: Filter out associations
Don't display associations on the "Hardware status" page. All and only associations have the "endpoints" property, use this is to filter. An example of an association is from the BMC inventory item to BMC software images. Tested: Loaded on a Witherspoon and no longer see the "Activation" item on the page. This "Activation" item was an association. All other items appear as normal. Change-Id: I6e6e24737b0a19e91dbd7eb691dd3d78f1b4c12c Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Diffstat (limited to 'app/common/services')
-rw-r--r--app/common/services/api-utils.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/common/services/api-utils.js b/app/common/services/api-utils.js
index 840db8e..503fcd1 100644
--- a/app/common/services/api-utils.js
+++ b/app/common/services/api-utils.js
@@ -1605,6 +1605,13 @@ window.angular && (function(angular) {
data = camelcaseToLabel(content.data[key]);
searchText = getSearchText(data);
title = key.split('/').pop();
+ // All and only associations have the property "endpoints".
+ // We don't want to show associations on the hardware page.
+ // Example: An association from the BMC inventory item to the
+ // BMC firmware images.
+ if (content.data[key].hasOwnProperty('endpoints')) {
+ continue;
+ }
title = titlelize(title);
// e.g. /xyz/openbmc_project/inventory/system and
OpenPOWER on IntegriCloud