From ac4ade9c3708915b21b5cd8cd28b376b6d345ede Mon Sep 17 00:00:00 2001 From: Xin Hao Zhang Date: Fri, 1 Oct 2021 16:55:12 +0000 Subject: [PATCH] cluster-ui: derive app name from route parameter in cluster-ui Fixes: #70998 Release justification: category 2 Previously, we were deriving the selected app name from the query string parameter in for the statements page in the cluster-ui package. The selected app name should be derived from the route parameter for the statements page. Release note (bug fix): the selected app name in the statements page is now derived from the route parameters. --- .../cluster-ui/src/statementsPage/statementsPage.selectors.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.selectors.ts b/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.selectors.ts index adcc70464717..4e39104e0c49 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.selectors.ts +++ b/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.selectors.ts @@ -17,7 +17,7 @@ import { ExecutionStatistics, flattenStatementStats, formatDate, - queryByName, + getMatchParamByName, statementKey, StatementStatistics, TimestampToMoment, @@ -144,7 +144,7 @@ export const selectStatements = createSelector( return null; } let statements = flattenStatementStats(state.data.statements); - const app = queryByName(props.location, appAttr); + const app = getMatchParamByName(props.match, appAttr); const isInternal = (statement: ExecutionStatistics) => statement.app.startsWith(state.data.internal_app_name_prefix);