@@ -16,7 +16,6 @@ import {PageMetaWithAutorefresh} from '../../components/PageMeta/PageMeta';
1616import { getTabletPagePath } from '../../routes' ;
1717import { selectIsUserAllowedToMakeChanges } from '../../store/reducers/authentication/authentication' ;
1818import { setHeaderBreadcrumbs } from '../../store/reducers/header/header' ;
19- import { nodeApi } from '../../store/reducers/node/node' ;
2019import { tabletApi } from '../../store/reducers/tablet' ;
2120import { EFlag } from '../../types/api/enums' ;
2221import type { TTabletStateInfo } from '../../types/api/tablet' ;
@@ -62,7 +61,6 @@ const tabletTabSchema = z.nativeEnum(TABLET_TABS_IDS).catch(TABLET_TABS_IDS.hist
6261const eTypeSchema = z . nativeEnum ( EType ) . or ( z . undefined ( ) ) . catch ( undefined ) ;
6362
6463const tabletQueryParams = {
65- nodeId : StringParam ,
6664 tenantName : StringParam ,
6765 type : StringParam ,
6866 clusterName : StringParam ,
@@ -74,18 +72,12 @@ export function Tablet() {
7472
7573 const { id} = useParams < { id : string } > ( ) ;
7674
77- const [
78- {
79- nodeId : queryNodeId ,
80- tenantName : queryDatabase ,
81- type : queryTabletType ,
82- clusterName : queryClusterName ,
83- } ,
84- ] = useQueryParams ( tabletQueryParams ) ;
75+ const [ { tenantName : queryDatabase , type : queryTabletType , clusterName : queryClusterName } ] =
76+ useQueryParams ( tabletQueryParams ) ;
8577
8678 const [ autoRefreshInterval ] = useAutoRefreshInterval ( ) ;
8779 const { currentData, isFetching, error} = tabletApi . useGetTabletQuery (
88- { id, database : queryDatabase ?? undefined , nodeId : queryNodeId ?? undefined } ,
80+ { id, database : queryDatabase ?? undefined } ,
8981 { pollingInterval : autoRefreshInterval } ,
9082 ) ;
9183
@@ -96,24 +88,19 @@ export function Tablet() {
9688 tablet . TenantId ? { tenantId : tablet . TenantId } : skipToken ,
9789 ) ;
9890
99- const nodeId = tablet . NodeId ?? queryNodeId ?? undefined ;
10091 const database = ( tenantPath || queryDatabase ) ?? undefined ;
10192
102- const nodeRole = useNodeRole ( nodeId ?. toString ( ) ) ;
103-
10493 const tabletType = tablet . Type || eTypeSchema . parse ( queryTabletType ) ;
10594
10695 React . useEffect ( ( ) => {
10796 dispatch (
10897 setHeaderBreadcrumbs ( 'tablet' , {
109- nodeId,
110- nodeRole,
11198 tenantName : queryDatabase ?? undefined ,
11299 tabletId : id ,
113100 tabletType,
114101 } ) ,
115102 ) ;
116- } , [ dispatch , queryDatabase , id , nodeId , nodeRole , tabletType ] ) ;
103+ } , [ dispatch , queryDatabase , id , tabletType ] ) ;
117104
118105 const { Leader, Type} = tablet ;
119106 const metaItems : string [ ] = [ ] ;
@@ -246,17 +233,3 @@ function Channels({id, hiveId}: {id: string; hiveId: string}) {
246233 </ LoaderWrapper >
247234 ) ;
248235}
249-
250- function useNodeRole ( nodeId : string | undefined ) {
251- const { currentData : node } = nodeApi . useGetNodeInfoQuery ( nodeId ? { nodeId} : skipToken ) ;
252-
253- let nodeRole : 'Storage' | 'Compute' | undefined ;
254-
255- if ( node ) {
256- // Compute nodes have tenantName, storage nodes doesn't
257- const isStorage = ! node ?. Tenants ?. [ 0 ] ;
258- nodeRole = isStorage ? 'Storage' : 'Compute' ;
259- }
260-
261- return nodeRole ;
262- }
0 commit comments