Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/containers/Node/Node.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ function NodePageContent({
);
}
case 'tablets': {
return <Tablets nodeId={nodeId} database={tenantName} />;
return <Tablets nodeId={nodeId} database={tenantName} onlyActive />;
}

case 'structure': {
Expand Down
9 changes: 6 additions & 3 deletions src/containers/Tablets/Tablets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,19 @@ interface TabletsProps {
path?: string;
database?: string;
nodeId?: string | number;
onlyActive?: boolean;
}

export function Tablets({nodeId, path, database}: TabletsProps) {
export function Tablets({nodeId, path, database, onlyActive}: TabletsProps) {
const [autoRefreshInterval] = useAutoRefreshInterval();

let params: TabletsApiRequestParams = {};
const filter = onlyActive ? `(State!=Dead)` : undefined;

if (valueIsDefined(nodeId)) {
params = {nodeId, database};
params = {nodeId, database, filter};
} else if (path) {
params = {path, database};
params = {path, database, filter};
}
const {isLoading, error} = tabletsApi.useGetTabletsInfoQuery(
Object.keys(params).length === 0 ? skipToken : params,
Expand Down
4 changes: 3 additions & 1 deletion src/services/api/viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import type {TTenantInfo, TTenants} from '../../types/api/tenant';
import type {DescribeTopicResult, TopicDataRequest, TopicDataResponse} from '../../types/api/topic';
import type {TEvVDiskStateResponse} from '../../types/api/vdisk';
import type {TUserToken} from '../../types/api/whoami';
import type {TabletsApiRequestParams} from '../../types/store/tablets';
import {BINARY_DATA_IN_PLAIN_TEXT_DISPLAY} from '../../utils/constants';
import type {Nullable} from '../../utils/typecheckers';
import {settingsManager} from '../settings';
Expand Down Expand Up @@ -128,7 +129,7 @@ export class ViewerAPI extends BaseYdbAPI {
}

getTabletsInfo(
{nodeId, path, database}: {nodeId?: string | number; path?: string; database?: string},
{nodeId, path, database, filter}: TabletsApiRequestParams,
{concurrentId, signal}: AxiosOptions = {},
) {
return this.get<TEvTabletStateResponse>(
Expand All @@ -138,6 +139,7 @@ export class ViewerAPI extends BaseYdbAPI {
node_id: nodeId,
path,
enums: true,
filter,
},
{concurrentId, requestConfig: {signal}},
);
Expand Down
1 change: 1 addition & 0 deletions src/types/store/tablets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ export interface TabletsApiRequestParams {
nodeId?: string | number;
path?: string;
database?: string;
filter?: string;
}
Loading