From acf65bc2099b59200d0faf0ba58664048e419154 Mon Sep 17 00:00:00 2001 From: Matthew Todd Date: Wed, 14 Dec 2022 15:57:14 -0500 Subject: [PATCH] ui: remove unused nodeNames property Epic: none Release note: None --- .../src/statementDetails/statementDetails.fixture.ts | 6 ------ .../cluster-ui/src/statementDetails/statementDetails.tsx | 1 - .../src/statementDetails/statementDetailsConnected.ts | 7 +------ .../db-console/src/views/statements/statementDetails.tsx | 6 +----- 4 files changed, 2 insertions(+), 18 deletions(-) diff --git a/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.fixture.ts b/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.fixture.ts index 94bfda564442..f7a81172c5ab 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.fixture.ts +++ b/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.fixture.ts @@ -815,12 +815,6 @@ export const getStatementDetailsPropsFixture = ( statementFingerprintID: "4705782015019656142", statementDetails: withData ? statementDetailsData : statementDetailsNoData, statementsError: null, - nodeNames: { - "1": "127.0.0.1:55529 (n1)", - "2": "127.0.0.1:55532 (n2)", - "3": "127.0.0.1:55538 (n3)", - "4": "127.0.0.1:55546 (n4)", - }, nodeRegions: { "1": "gcp-us-east1", "2": "gcp-us-east1", diff --git a/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.tsx b/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.tsx index 35cb7139c02c..6fad4dfc3af9 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.tsx @@ -133,7 +133,6 @@ export interface StatementDetailsStateProps { isLoading: boolean; statementsError: Error | null; timeScale: TimeScale; - nodeNames: { [nodeId: string]: string }; nodeRegions: { [nodeId: string]: string }; diagnosticsReports: StatementDiagnosticsReport[]; uiConfig?: UIConfigState["pages"]["statementDetails"]; diff --git a/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetailsConnected.ts b/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetailsConnected.ts index 6242b1066498..6b2c364edd46 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetailsConnected.ts +++ b/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetailsConnected.ts @@ -25,10 +25,7 @@ import { selectIsTenant, selectHasViewActivityRedactedRole, } from "../store/uiConfig"; -import { - nodeDisplayNameByIDSelector, - nodeRegionsByIDSelector, -} from "../store/nodes"; +import { nodeRegionsByIDSelector } from "../store/nodes"; import { actions as sqlDetailsStatsActions } from "src/store/statementDetails"; import { actions as sqlStatsActions } from "src/store/sqlStats"; import { @@ -62,8 +59,6 @@ const mapStateToProps = (state: AppState, props: RouteComponentProps) => { isLoading: isLoading, statementsError: lastError, timeScale: selectTimeScale(state), - // TODO(todd): Remove this unused property! - nodeNames: selectIsTenant(state) ? {} : nodeDisplayNameByIDSelector(state), nodeRegions: nodeRegionsByIDSelector(state), diagnosticsReports: selectIsTenant(state) || selectHasViewActivityRedactedRole(state) diff --git a/pkg/ui/workspaces/db-console/src/views/statements/statementDetails.tsx b/pkg/ui/workspaces/db-console/src/views/statements/statementDetails.tsx index e9c7159bfa4f..854505841b0b 100644 --- a/pkg/ui/workspaces/db-console/src/views/statements/statementDetails.tsx +++ b/pkg/ui/workspaces/db-console/src/views/statements/statementDetails.tsx @@ -20,10 +20,7 @@ import { refreshUserSQLRoles, } from "src/redux/apiReducers"; import { RouteComponentProps } from "react-router"; -import { - nodeDisplayNameByIDSelector, - nodeRegionsByIDSelector, -} from "src/redux/nodes"; +import { nodeRegionsByIDSelector } from "src/redux/nodes"; import { AdminUIState, AppDispatch } from "src/redux/state"; import { selectDiagnosticsReportsByStatementFingerprint } from "src/redux/statements/statementsSelectors"; import { @@ -109,7 +106,6 @@ const mapStateToProps = ( isLoading: isLoading, statementsError: lastError, timeScale: selectTimeScale(state), - nodeNames: nodeDisplayNameByIDSelector(state), nodeRegions: nodeRegionsByIDSelector(state), diagnosticsReports: selectDiagnosticsReportsByStatementFingerprint( state,