From b45abeaad5862969566a3074d60f8b80c132db26 Mon Sep 17 00:00:00 2001 From: Tharun Rajendran Date: Thu, 20 Aug 2020 21:35:53 +0530 Subject: [PATCH] Fix tap filter authority (#4810) Tap component is calling fetch metrics with skip_stats and authority service type is not sent.So, authority dropdown is not getting populated. Added a seperate call to get metrics for authority Fixes #4697 Signed-off-by: Tharun --- web/app/js/components/Tap.jsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/web/app/js/components/Tap.jsx b/web/app/js/components/Tap.jsx index 15ccee807..b9cbbc30b 100644 --- a/web/app/js/components/Tap.jsx +++ b/web/app/js/components/Tap.jsx @@ -262,11 +262,12 @@ class Tap extends React.Component { }); const url = this.api.urlsForResourceNoStats('all'); - this.api.setCurrentRequests([this.api.fetchMetrics(url)]); + const authorityUrl = this.api.urlsForResource('authority'); + this.api.setCurrentRequests([this.api.fetchMetrics(url), this.api.fetchMetrics(authorityUrl)]); this.serverPromise = Promise.all(this.api.getCurrentPromises()) - .then(([rsp]) => { - const { resourcesByNs, authoritiesByNs } = groupResourcesByNs(rsp); - + .then(rsp => { + const { resourcesByNs } = groupResourcesByNs(rsp[0]); + const { authoritiesByNs } = groupResourcesByNs(rsp[1]); this.setState({ resourcesByNs, authoritiesByNs,