From 2fa7faa65e4f50605b9191a81171722dfa02595e Mon Sep 17 00:00:00 2001 From: maryliag Date: Fri, 2 Feb 2024 15:18:43 -0500 Subject: [PATCH] ui: remove warning when auto refresh enable The warning being displayed about old active executions was not bein properly removed when the auto refresh was turned back on. This commit fixes this for both Statements and Transactions pages, on Active Executions. Fixes CRDB-35837 Release note (ui change): Properly remove warning of old date on Active Executions when auto refresh is enabled. --- .../cluster-ui/src/statementsPage/activeStatementsView.tsx | 1 + .../cluster-ui/src/transactionsPage/activeTransactionsView.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/ui/workspaces/cluster-ui/src/statementsPage/activeStatementsView.tsx b/pkg/ui/workspaces/cluster-ui/src/statementsPage/activeStatementsView.tsx index 1ff7d10eb1cf..1afcb5e7defb 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statementsPage/activeStatementsView.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/statementsPage/activeStatementsView.tsx @@ -219,6 +219,7 @@ export const ActiveStatementsView: React.FC = ({ const onSubmitToggleAutoRefresh = () => { // Refresh immediately when toggling auto-refresh on. if (!isAutoRefreshEnabled) { + setDisplayRefreshAlert(false); refreshLiveWorkload(); } onAutoRefreshToggle(!isAutoRefreshEnabled); diff --git a/pkg/ui/workspaces/cluster-ui/src/transactionsPage/activeTransactionsView.tsx b/pkg/ui/workspaces/cluster-ui/src/transactionsPage/activeTransactionsView.tsx index a9d9b7da0322..baa135003959 100644 --- a/pkg/ui/workspaces/cluster-ui/src/transactionsPage/activeTransactionsView.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/transactionsPage/activeTransactionsView.tsx @@ -218,6 +218,7 @@ export const ActiveTransactionsView: React.FC = ({ const onSubmitToggleAutoRefresh = () => { // Refresh immediately when toggling auto-refresh on. if (!isAutoRefreshEnabled) { + setDisplayRefreshAlert(false); refreshLiveWorkload(); } onAutoRefreshToggle(!isAutoRefreshEnabled);