Skip to content

Commit d6f29a2

Browse files
authored
fix: do not show backups if no control_plane (#2487)
1 parent 12a3bcf commit d6f29a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/containers/Tenant/Diagnostics/Diagnostics.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
useFeatureFlagsAvailable,
1111
useTopicDataAvailable,
1212
} from '../../../store/reducers/capabilities/hooks';
13+
import {useClusterBaseInfo} from '../../../store/reducers/cluster/cluster';
1314
import {TENANT_DIAGNOSTICS_TABS_IDS} from '../../../store/reducers/tenant/constants';
1415
import {setDiagnosticsTab} from '../../../store/reducers/tenant/tenant';
1516
import type {AdditionalNodesProps, AdditionalTenantsProps} from '../../../types/additionalProps';
@@ -49,6 +50,7 @@ const b = cn('kv-tenant-diagnostics');
4950

5051
function Diagnostics(props: DiagnosticsProps) {
5152
const {path, database, type, subType} = useCurrentSchema();
53+
const {control_plane: controlPlane} = useClusterBaseInfo();
5254
const containerRef = React.useRef<HTMLDivElement>(null);
5355
const dispatch = useTypedDispatch();
5456
const {diagnosticsTab = TENANT_DIAGNOSTICS_TABS_IDS.overview} = useTypedSelector(
@@ -65,7 +67,7 @@ function Diagnostics(props: DiagnosticsProps) {
6567
hasFeatureFlags,
6668
hasTopicData,
6769
isTopLevel: path === database,
68-
hasBackups: typeof uiFactory.renderBackups === 'function',
70+
hasBackups: typeof uiFactory.renderBackups === 'function' && Boolean(controlPlane),
6971
});
7072
let activeTab = pages.find((el) => el.id === diagnosticsTab);
7173
if (!activeTab) {

0 commit comments

Comments
 (0)