@@ -10,6 +10,7 @@ import {ResponseError} from '../../components/Errors/ResponseError';
1010import { FullNodeViewer } from '../../components/FullNodeViewer/FullNodeViewer' ;
1111import { Loader } from '../../components/Loader' ;
1212import routes , { createHref , parseQuery } from '../../routes' ;
13+ import { useDiskPagesAvailable } from '../../store/reducers/capabilities/hooks' ;
1314import { setHeaderBreadcrumbs } from '../../store/reducers/header/header' ;
1415import { nodeApi } from '../../store/reducers/node/node' ;
1516import type { AdditionalNodesProps } from '../../types/additionalProps' ;
@@ -18,7 +19,8 @@ import {useAutoRefreshInterval, useTypedDispatch} from '../../utils/hooks';
1819import { StorageWrapper } from '../Storage/StorageWrapper' ;
1920import { Tablets } from '../Tablets' ;
2021
21- import { NODE_PAGES , OVERVIEW , STORAGE , TABLETS } from './NodePages' ;
22+ import { NODE_PAGES , OVERVIEW , STORAGE , STRUCTURE , TABLETS } from './NodePages' ;
23+ import NodeStructure from './NodeStructure/NodeStructure' ;
2224
2325import './Node.scss' ;
2426
@@ -50,11 +52,15 @@ export function Node(props: NodeProps) {
5052 ) ;
5153 const loading = isFetching && currentData === undefined ;
5254 const node = currentData ;
55+ const isDiskPagesAvailable = useDiskPagesAvailable ( ) ;
5356
5457 const { activeTabVerified, nodeTabs} = React . useMemo ( ( ) => {
5558 const hasStorage = node ?. Roles ?. find ( ( el ) => el === STORAGE_ROLE ) ;
5659
57- const nodePages = hasStorage ? NODE_PAGES : NODE_PAGES . filter ( ( el ) => el . id !== STORAGE ) ;
60+ let nodePages = hasStorage ? NODE_PAGES : NODE_PAGES . filter ( ( el ) => el . id !== STORAGE ) ;
61+ if ( isDiskPagesAvailable ) {
62+ nodePages = nodePages . filter ( ( el ) => el . id !== STRUCTURE ) ;
63+ }
5864
5965 const actualNodeTabs = nodePages . map ( ( page ) => {
6066 return {
@@ -69,7 +75,7 @@ export function Node(props: NodeProps) {
6975 }
7076
7177 return { activeTabVerified : actualActiveTab , nodeTabs : actualNodeTabs } ;
72- } , [ activeTab , node ] ) ;
78+ } , [ activeTab , node , isDiskPagesAvailable ] ) ;
7379
7480 const tenantName = node ?. Tenants ?. [ 0 ] || tenantNameFromQuery ?. toString ( ) ;
7581
@@ -131,6 +137,9 @@ export function Node(props: NodeProps) {
131137 ) ;
132138 }
133139
140+ case STRUCTURE : {
141+ return < NodeStructure className = { b ( 'node-page-wrapper' ) } nodeId = { nodeId } /> ;
142+ }
134143 case OVERVIEW : {
135144 return < FullNodeViewer node = { node } className = { b ( 'overview-wrapper' ) } /> ;
136145 }
0 commit comments