Skip to content

Commit aa215a0

Browse files
fix(Storage): use groupId param only if no nodeId
1 parent 9008098 commit aa215a0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/containers/Storage/Storage.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import type {
2525
StorageType,
2626
VisibleEntities,
2727
} from '../../store/reducers/storage/types';
28+
import {valueIsDefined} from '../../utils';
2829
import {DEFAULT_TABLE_SETTINGS} from '../../utils/constants';
2930
import {useAutoRefreshInterval, useTableSort} from '../../utils/hooks';
3031
import {NodesUptimeFilterValues, nodesUptimeFilterValuesSchema} from '../../utils/nodes';
@@ -117,7 +118,13 @@ export const Storage = ({database, nodeId, groupId, pDiskId}: StorageProps) => {
117118
} = useStorageGroupsSelectedColumns(visibleEntities);
118119

119120
const nodesQuery = storageApi.useGetStorageNodesInfoQuery(
120-
{database, with: visibleEntities, node_id: nodeId, group_id: groupId},
121+
{
122+
database,
123+
with: visibleEntities,
124+
node_id: nodeId,
125+
// node_id and group_id params doesn't work together
126+
group_id: valueIsDefined(nodeId) ? undefined : groupId,
127+
},
121128
{
122129
skip: !isNodes,
123130
pollingInterval: autoRefreshInterval,

0 commit comments

Comments
 (0)