From 13393d73ddd05f3ed09227cb975e623dc118576e Mon Sep 17 00:00:00 2001 From: Elena Makarova Date: Thu, 26 Jun 2025 08:59:33 +0300 Subject: [PATCH] fix: do not show backups if no control_plane --- src/containers/Tenant/Diagnostics/Diagnostics.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/containers/Tenant/Diagnostics/Diagnostics.tsx b/src/containers/Tenant/Diagnostics/Diagnostics.tsx index bf9ec04d9..f03dc88bc 100644 --- a/src/containers/Tenant/Diagnostics/Diagnostics.tsx +++ b/src/containers/Tenant/Diagnostics/Diagnostics.tsx @@ -10,6 +10,7 @@ import { useFeatureFlagsAvailable, useTopicDataAvailable, } from '../../../store/reducers/capabilities/hooks'; +import {useClusterBaseInfo} from '../../../store/reducers/cluster/cluster'; import {TENANT_DIAGNOSTICS_TABS_IDS} from '../../../store/reducers/tenant/constants'; import {setDiagnosticsTab} from '../../../store/reducers/tenant/tenant'; import type {AdditionalNodesProps, AdditionalTenantsProps} from '../../../types/additionalProps'; @@ -49,6 +50,7 @@ const b = cn('kv-tenant-diagnostics'); function Diagnostics(props: DiagnosticsProps) { const {path, database, type, subType} = useCurrentSchema(); + const {control_plane: controlPlane} = useClusterBaseInfo(); const containerRef = React.useRef(null); const dispatch = useTypedDispatch(); const {diagnosticsTab = TENANT_DIAGNOSTICS_TABS_IDS.overview} = useTypedSelector( @@ -65,7 +67,7 @@ function Diagnostics(props: DiagnosticsProps) { hasFeatureFlags, hasTopicData, isTopLevel: path === database, - hasBackups: typeof uiFactory.renderBackups === 'function', + hasBackups: typeof uiFactory.renderBackups === 'function' && Boolean(controlPlane), }); let activeTab = pages.find((el) => el.id === diagnosticsTab); if (!activeTab) {