@@ -4,12 +4,28 @@ import {skipToken} from '@reduxjs/toolkit/query';
44import { isNil } from 'lodash' ;
55
66import { selectTabletsWithFqdn , tabletsApi } from '../../store/reducers/tablets' ;
7+ import { ETabletState } from '../../types/api/tablet' ;
78import type { TabletsApiRequestParams } from '../../types/store/tablets' ;
89import { valueIsDefined } from '../../utils' ;
910import { useAutoRefreshInterval , useTypedSelector } from '../../utils/hooks' ;
1011
1112import { TabletsTable } from './TabletsTable' ;
1213
14+ const activeStatuses : ETabletState [ ] = [
15+ ETabletState . Created ,
16+ ETabletState . ResolveStateStorage ,
17+ ETabletState . Candidate ,
18+ ETabletState . BlockBlobStorage ,
19+ ETabletState . RebuildGraph ,
20+ ETabletState . WriteZeroEntry ,
21+ ETabletState . Restored ,
22+ ETabletState . Discover ,
23+ ETabletState . Lock ,
24+ ETabletState . Active ,
25+ ETabletState . ResolveLeader ,
26+ ETabletState . Terminating ,
27+ ] ;
28+
1329interface TabletsProps {
1430 path ?: string ;
1531 database ?: string ;
@@ -34,9 +50,7 @@ export function Tablets({
3450 const [ autoRefreshInterval ] = useAutoRefreshInterval ( ) ;
3551
3652 let params : TabletsApiRequestParams = { } ;
37- const filter = onlyActive
38- ? `(State=[Created,ResolveStateStorage,Candidate,BlockBlobStorage,RebuildGraph,WriteZeroEntry,Restored,Discover,Lock,Active,ResolveLeader,Terminating])`
39- : undefined ;
53+ const filter = onlyActive ? `(State=[${ activeStatuses . join ( ',' ) } ])` : undefined ;
4054
4155 const schemaPathParam = React . useMemo ( ( ) => {
4256 if ( ! isNil ( path ) && ! isNil ( databaseFullPath ) ) {
0 commit comments