Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 1 addition & 5 deletions src/containers/Node/Node.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ import {useAutoRefreshInterval, useTypedDispatch} from '../../utils/hooks';
import {StorageWrapper} from '../Storage/StorageWrapper';
import {Tablets} from '../Tablets';

import {NODE_PAGES, OVERVIEW, STORAGE, STRUCTURE, TABLETS} from './NodePages';
import NodeStructure from './NodeStructure/NodeStructure';
import {NODE_PAGES, OVERVIEW, STORAGE, TABLETS} from './NodePages';

import './Node.scss';

Expand Down Expand Up @@ -136,9 +135,6 @@ export function Node(props: NodeProps) {
return <FullNodeViewer node={node} className={b('overview-wrapper')} />;
}

case STRUCTURE: {
return <NodeStructure className={b('node-page-wrapper')} nodeId={nodeId} />;
}
default:
return false;
}
Expand Down
9 changes: 5 additions & 4 deletions src/containers/Node/NodePages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ export const NODE_PAGES = [
id: STORAGE,
name: 'Storage',
},
{
id: STRUCTURE,
name: 'Structure',
},
// TODO: remove Node Structure component
// {
// id: STRUCTURE,
// name: 'Structure',
// },
{
id: TABLETS,
name: 'Tablets',
Expand Down
10 changes: 3 additions & 7 deletions src/containers/Storage/Storage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const Storage = ({additionalNodesProps, database, nodeId}: StorageProps)
uptimeFilter: StringParam,
usageFilter: UsageFilterParam,
});
const type = storageTypeSchema.parse(queryParams.type);
const storageType = storageTypeSchema.parse(queryParams.type);
const visibleEntities = visibleEntitiesSchema.parse(queryParams.visible);
const filter = queryParams.search ?? '';
const uptimeFilter = nodesUptimeFilterValuesSchema.parse(queryParams.uptimeFilter);
Expand All @@ -90,12 +90,8 @@ export const Storage = ({additionalNodesProps, database, nodeId}: StorageProps)
});
const groupsSortParams = groupSort.sortOrder ? groupSort : getDefaultSortGroup(visibleEntities);

// Do not display Nodes table for Node page (NodeId present)
const isNodePage = nodeId !== undefined;
const storageType = isNodePage ? STORAGE_TYPES.groups : type;

const nodesQuery = storageApi.useGetStorageNodesInfoQuery(
{database, visibleEntities},
{database, visibleEntities, node_id: nodeId},
{
skip: storageType !== STORAGE_TYPES.nodes,
pollingInterval: autoRefreshInterval,
Expand Down Expand Up @@ -198,7 +194,7 @@ export const Storage = ({additionalNodesProps, database, nodeId}: StorageProps)
<StorageControls
searchValue={filter}
handleSearchValueChange={handleTextFilterChange}
withTypeSelector={!isNodePage}
withTypeSelector
storageType={storageType}
handleStorageTypeChange={handleStorageTypeChange}
visibleEntities={visibleEntities}
Expand Down
1 change: 1 addition & 0 deletions src/services/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ export class YdbEmbeddedAPI extends AxiosWrapper {
// TODO: remove after remove tenant param
database: params.database || params.tenant,
tenant: params.tenant || params.database,
node_id: params.node_id,
},
{concurrentId, requestConfig: {signal}},
);
Expand Down