@@ -10,10 +10,15 @@ import type {
1010 TabletsBreadcrumbsOptions ,
1111 TenantBreadcrumbsOptions ,
1212} from '../../store/reducers/header/types' ;
13+ import {
14+ TENANT_DIAGNOSTICS_TABS_IDS ,
15+ TENANT_PAGE ,
16+ TENANT_PAGES_IDS ,
17+ } from '../../store/reducers/tenant/constants' ;
1318import routes , { createHref } from '../../routes' ;
1419
1520import { getClusterPath } from '../Cluster/utils' ;
16- import { getTenantPath } from '../Tenant/TenantPages' ;
21+ import { TenantTabsGroups , getTenantPath } from '../Tenant/TenantPages' ;
1722import { getDefaultNodePath } from '../Node/NodePages' ;
1823
1924const prepareTenantName = ( tenantName : string ) => {
@@ -61,10 +66,16 @@ const getNodeBreadcrumbs = (options: NodeBreadcrumbsOptions, query = {}): RawBre
6166 // Compute nodes have tenantName, storage nodes doesn't
6267 const isStorageNode = ! tenantName ;
6368
69+ const newQuery = {
70+ ...query ,
71+ [ TENANT_PAGE ] : TENANT_PAGES_IDS . diagnostics ,
72+ [ TenantTabsGroups . diagnosticsTab ] : TENANT_DIAGNOSTICS_TABS_IDS . nodes ,
73+ } ;
74+
6475 if ( isStorageNode ) {
6576 breadcrumbs = getClusterBreadcrumbs ( options , query ) ;
6677 } else {
67- breadcrumbs = getTenantBreadcrumbs ( options , query ) ;
78+ breadcrumbs = getTenantBreadcrumbs ( options , newQuery ) ;
6879 }
6980
7081 const text = nodeId ? `Node ${ nodeId } ` : 'Node' ;
@@ -79,21 +90,26 @@ const getTabletsBreadcrubms = (
7990 options : TabletsBreadcrumbsOptions ,
8091 query = { } ,
8192) : RawBreadcrumbItem [ ] => {
82- const { tenantName, nodeIds, state, type} = options ;
93+ const { tenantName, nodeIds} = options ;
94+
95+ const newQuery = {
96+ ...query ,
97+ [ TENANT_PAGE ] : TENANT_PAGES_IDS . diagnostics ,
98+ [ TenantTabsGroups . diagnosticsTab ] : TENANT_DIAGNOSTICS_TABS_IDS . tablets ,
99+ } ;
83100
84101 let breadcrumbs : RawBreadcrumbItem [ ] ;
85102
86103 // Cluster system tablets don't have tenantName
87104 if ( tenantName ) {
88- breadcrumbs = getTenantBreadcrumbs ( options , query ) ;
105+ breadcrumbs = getTenantBreadcrumbs ( options , newQuery ) ;
89106 } else {
90107 breadcrumbs = getClusterBreadcrumbs ( options , query ) ;
91108 }
92109
93110 const link = createHref ( routes . tabletsFilters , undefined , {
111+ ...query ,
94112 nodeIds,
95- state,
96- type,
97113 path : tenantName ,
98114 } ) ;
99115
0 commit comments