@@ -7,6 +7,7 @@ import {StringParam, useQueryParams} from 'use-query-params';
7
7
8
8
import { AutoRefreshControl } from '../../../components/AutoRefreshControl/AutoRefreshControl' ;
9
9
import routes , { createHref } from '../../../routes' ;
10
+ import { useFeatureFlagsAvailable } from '../../../store/reducers/capabilities/hooks' ;
10
11
import { TENANT_DIAGNOSTICS_TABS_IDS } from '../../../store/reducers/tenant/constants' ;
11
12
import { setDiagnosticsTab } from '../../../store/reducers/tenant/tenant' ;
12
13
import type { AdditionalNodesProps , AdditionalTenantsProps } from '../../../types/additionalProps' ;
@@ -25,7 +26,7 @@ import {Configs} from './Configs/Configs';
25
26
import { Consumers } from './Consumers' ;
26
27
import Describe from './Describe/Describe' ;
27
28
import DetailedOverview from './DetailedOverview/DetailedOverview' ;
28
- import { DATABASE_PAGES , getPagesByType } from './DiagnosticsPages' ;
29
+ import { getDataBasePages , getPagesByType } from './DiagnosticsPages' ;
29
30
import { HotKeys } from './HotKeys/HotKeys' ;
30
31
import { Network } from './Network/Network' ;
31
32
import { Partitions } from './Partitions/Partitions' ;
@@ -62,7 +63,8 @@ function Diagnostics(props: DiagnosticsProps) {
62
63
const tenantName = isDatabaseEntityType ( props . type ) ? props . path : props . tenantName ;
63
64
const isDatabase = isDatabaseEntityType ( props . type ) || props . path === props . tenantName ;
64
65
65
- const pages = isDatabase ? DATABASE_PAGES : getPagesByType ( props . type ) ;
66
+ const hasFeatureFlags = useFeatureFlagsAvailable ( ) ;
67
+ const pages = isDatabase ? getDataBasePages ( { hasFeatureFlags} ) : getPagesByType ( props . type ) ;
66
68
let activeTab = pages . find ( ( el ) => el . id === diagnosticsTab ) ;
67
69
if ( ! activeTab ) {
68
70
activeTab = pages [ 0 ] ;
0 commit comments