Skip to content

Commit

Permalink
fix: remove tablets from some api handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
artemmufazalov committed Aug 12, 2024
1 parent 085e116 commit e674b89
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/containers/Nodes/getNodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ const getConcurrentId = (limit?: number, offset?: number) => {
export const getNodes = async ({
type = 'any',
storage = false,
tablets = true,
limit,
offset,
...params
}: NodesApiRequestParams) => {
const response = await window.api.getNodes(
{type, storage, limit, offset, ...params},
{type, storage, tablets, limit, offset, ...params},
{concurrentId: getConcurrentId(limit, offset)},
);
const preparedResponse = prepareNodesData(response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function TopNodesByMemory({tenantName, additionalNodesProps}: TopNodesByM
});

const {currentData, isFetching, error} = topNodesApi.useGetTopNodesQuery(
{tenant: tenantName, sortValue: 'Memory'},
{tenant: tenantName, sortValue: 'Memory', tablets: true},
{pollingInterval: autoRefreshInterval},
);

Expand Down
8 changes: 4 additions & 4 deletions src/services/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ export class YdbEmbeddedAPI extends AxiosWrapper {
return this.get<TTenantInfo>(
this.getPath('/viewer/json/tenantinfo'),
{
tablets: 0,
storage: 1,
tablets: false,
storage: true,
cluster_name: clusterName,
},
{concurrentId, requestConfig: {signal}},
Expand All @@ -137,7 +137,7 @@ export class YdbEmbeddedAPI extends AxiosWrapper {
{
database,
path,
tablets: true,
tablets: false,
storage: true,
},
{concurrentId, requestConfig: {signal}},
Expand All @@ -147,7 +147,7 @@ export class YdbEmbeddedAPI extends AxiosWrapper {
{
visibleEntities,
type = 'any',
tablets = true,
tablets = false,
sortOrder,
sortValue,
...params
Expand Down
1 change: 1 addition & 0 deletions src/store/reducers/nodes/nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const nodesApi = api.injectEndpoints({
{
type: 'any',
storage: false,
tablets: true,
...params,
},
{signal},
Expand Down
2 changes: 1 addition & 1 deletion src/store/reducers/storage/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const storageApi = api.injectEndpoints({
queryFn: async (params: Omit<NodesApiRequestParams, 'type'>, {signal}) => {
try {
const result = await window.api.getNodes(
{storage: true, type: 'static', tablets: false, ...params},
{storage: true, type: 'static', ...params},
{signal},
);
return {data: prepareStorageNodesResponse(result)};
Expand Down

0 comments on commit e674b89

Please sign in to comment.