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 <rajendrantharun@live.com>
This commit is contained in:
Tharun Rajendran 2020-08-20 21:35:53 +05:30 committed by GitHub
parent c2301749ef
commit b45abeaad5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -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,