Milimetric has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/266768

Change subject: Show only relevant categories
......................................................................

Show only relevant categories

Bug: T124926
Change-Id: I9c5eb64920e268c0826d18441cb9f1d682b922be
---
M src/components/metric-selector/metric-selector.js
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/dashiki 
refs/changes/68/266768/1

diff --git a/src/components/metric-selector/metric-selector.js 
b/src/components/metric-selector/metric-selector.js
index 6453fd7..f738492 100644
--- a/src/components/metric-selector/metric-selector.js
+++ b/src/components/metric-selector/metric-selector.js
@@ -66,6 +66,12 @@
                 })).sort(utils.sortByNameIgnoreCase)
             });
 
+            // lots of different categories are sharing the same layout,
+            // hide the ones that have no metrics configured for this dash
+            categories = categories.filter(function (c) {
+                return c.metrics.length;
+            });
+
             if (categories.length) {
                 this.selectedCategory(categories[0]);
             }

-- 
To view, visit https://gerrit.wikimedia.org/r/266768
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c5eb64920e268c0826d18441cb9f1d682b922be
Gerrit-PatchSet: 1
Gerrit-Project: analytics/dashiki
Gerrit-Branch: master
Gerrit-Owner: Milimetric <dandree...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to