@@ -4,7 +4,7 @@ import {Flex, Tabs} from '@gravity-ui/uikit';
4
4
import { skipToken } from '@reduxjs/toolkit/query' ;
5
5
import { Helmet } from 'react-helmet-async' ;
6
6
import { useParams } from 'react-router-dom' ;
7
- import { StringParam , useQueryParams } from 'use-query-params' ;
7
+ import { useQueryParams } from 'use-query-params' ;
8
8
import { z } from 'zod' ;
9
9
10
10
import { EmptyStateWrapper } from '../../components/EmptyState' ;
@@ -13,7 +13,7 @@ import {ResponseError} from '../../components/Errors/ResponseError';
13
13
import { InternalLink } from '../../components/InternalLink' ;
14
14
import { LoaderWrapper } from '../../components/LoaderWrapper/LoaderWrapper' ;
15
15
import { PageMetaWithAutorefresh } from '../../components/PageMeta/PageMeta' ;
16
- import { getTabletPagePath } from '../../routes' ;
16
+ import { getTabletPagePath , tabletPageQueryParams } from '../../routes' ;
17
17
import { selectIsUserAllowedToMakeChanges } from '../../store/reducers/authentication/authentication' ;
18
18
import { setHeaderBreadcrumbs } from '../../store/reducers/header/header' ;
19
19
import { tabletApi } from '../../store/reducers/tablet' ;
@@ -58,19 +58,13 @@ const TABLET_PAGE_TABS = [
58
58
59
59
const tabletTabSchema = z . nativeEnum ( TABLET_TABS_IDS ) . catch ( TABLET_TABS_IDS . history ) ;
60
60
61
- const tabletQueryParams = {
62
- tenantName : StringParam ,
63
- clusterName : StringParam ,
64
- activeTab : StringParam ,
65
- } ;
66
-
67
61
export function Tablet ( ) {
68
62
const dispatch = useTypedDispatch ( ) ;
69
63
70
64
const { id} = useParams < { id : string } > ( ) ;
71
65
72
- const [ { tenantName : queryDatabase , clusterName : queryClusterName } ] =
73
- useQueryParams ( tabletQueryParams ) ;
66
+ const [ { database : queryDatabase , clusterName : queryClusterName } ] =
67
+ useQueryParams ( tabletPageQueryParams ) ;
74
68
75
69
const [ autoRefreshInterval ] = useAutoRefreshInterval ( ) ;
76
70
const { currentData, isFetching, error} = tabletApi . useGetTabletQuery (
@@ -168,7 +162,7 @@ function TabletTabs({
168
162
hiveId ?: string ;
169
163
history : ITabletPreparedHistoryItem [ ] ;
170
164
} ) {
171
- const [ { activeTab, ...restParams } , setParams ] = useQueryParams ( tabletQueryParams ) ;
165
+ const [ { activeTab, ...restParams } , setParams ] = useQueryParams ( tabletPageQueryParams ) ;
172
166
const isUserAllowedToMakeChanges = useTypedSelector ( selectIsUserAllowedToMakeChanges ) ;
173
167
174
168
const noAdvancedInfo = ! isUserAllowedToMakeChanges || ! hasHive ( hiveId ) ;
0 commit comments