Skip to content

Commit e1734c8

Browse files
committed
fix: review
1 parent 35af584 commit e1734c8

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

src/containers/Tablets/Tablets.tsx

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,28 @@ import {skipToken} from '@reduxjs/toolkit/query';
44
import {isNil} from 'lodash';
55

66
import {selectTabletsWithFqdn, tabletsApi} from '../../store/reducers/tablets';
7+
import {ETabletState} from '../../types/api/tablet';
78
import type {TabletsApiRequestParams} from '../../types/store/tablets';
89
import {valueIsDefined} from '../../utils';
910
import {useAutoRefreshInterval, useTypedSelector} from '../../utils/hooks';
1011

1112
import {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+
1329
interface 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)) {

src/types/api/tablet.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ export enum ETabletState {
118118
'ResolveLeader' = 'ResolveLeader',
119119
'Deleted' = 'Deleted',
120120
'Stopped' = 'Stopped',
121+
'Terminating' = 'Terminating',
121122
}
122123

123124
interface TBoundChannel {

0 commit comments

Comments
 (0)