Skip to content

Commit

Permalink
Simplify metrics loading in the overview page since we load all metri…
Browse files Browse the repository at this point in the history
…cs anyways
  • Loading branch information
kovyrin committed Oct 12, 2021
1 parent 548a2a5 commit 4bd67ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
import { schema } from '@kbn/config-schema';
import { prefixIndexPattern } from '../../../../../common/ccs_utils';
import { getMetrics } from '../../../../lib/details/get_metrics';
import { metricSet } from './metric_set_overview';
import { handleError } from '../../../../lib/errors';
import { INDEX_PATTERN_ENTERPRISE_SEARCH } from '../../../../../common/constants';
import { getStats } from '../../../../lib/enterprise_search';
import { metrics as entSearchMetrics } from '../../../../lib/metrics/enterprise_search/metrics';

export function entSearchOverviewRoute(server) {
server.route({
Expand Down Expand Up @@ -41,6 +41,9 @@ export function entSearchOverviewRoute(server) {
);

try {
// We use all the metrics on the overview page
const metricSet = Object.keys(entSearchMetrics);

const [stats, metrics] = await Promise.all([
getStats(req, entSearchIndexPattern, clusterUuid),
getMetrics(req, entSearchIndexPattern, metricSet, [], {
Expand Down

0 comments on commit 4bd67ab

Please sign in to comment.