@@ -10,10 +10,15 @@ import type {
10
10
TabletsBreadcrumbsOptions ,
11
11
TenantBreadcrumbsOptions ,
12
12
} 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' ;
13
18
import routes , { createHref } from '../../routes' ;
14
19
15
20
import { getClusterPath } from '../Cluster/utils' ;
16
- import { getTenantPath } from '../Tenant/TenantPages' ;
21
+ import { TenantTabsGroups , getTenantPath } from '../Tenant/TenantPages' ;
17
22
import { getDefaultNodePath } from '../Node/NodePages' ;
18
23
19
24
const prepareTenantName = ( tenantName : string ) => {
@@ -61,10 +66,16 @@ const getNodeBreadcrumbs = (options: NodeBreadcrumbsOptions, query = {}): RawBre
61
66
// Compute nodes have tenantName, storage nodes doesn't
62
67
const isStorageNode = ! tenantName ;
63
68
69
+ const newQuery = {
70
+ ...query ,
71
+ [ TENANT_PAGE ] : TENANT_PAGES_IDS . diagnostics ,
72
+ [ TenantTabsGroups . diagnosticsTab ] : TENANT_DIAGNOSTICS_TABS_IDS . nodes ,
73
+ } ;
74
+
64
75
if ( isStorageNode ) {
65
76
breadcrumbs = getClusterBreadcrumbs ( options , query ) ;
66
77
} else {
67
- breadcrumbs = getTenantBreadcrumbs ( options , query ) ;
78
+ breadcrumbs = getTenantBreadcrumbs ( options , newQuery ) ;
68
79
}
69
80
70
81
const text = nodeId ? `Node ${ nodeId } ` : 'Node' ;
@@ -79,21 +90,26 @@ const getTabletsBreadcrubms = (
79
90
options : TabletsBreadcrumbsOptions ,
80
91
query = { } ,
81
92
) : 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
+ } ;
83
100
84
101
let breadcrumbs : RawBreadcrumbItem [ ] ;
85
102
86
103
// Cluster system tablets don't have tenantName
87
104
if ( tenantName ) {
88
- breadcrumbs = getTenantBreadcrumbs ( options , query ) ;
105
+ breadcrumbs = getTenantBreadcrumbs ( options , newQuery ) ;
89
106
} else {
90
107
breadcrumbs = getClusterBreadcrumbs ( options , query ) ;
91
108
}
92
109
93
110
const link = createHref ( routes . tabletsFilters , undefined , {
111
+ ...query ,
94
112
nodeIds,
95
- state,
96
- type,
97
113
path : tenantName ,
98
114
} ) ;
99
115
0 commit comments