Skip to content

Commit 66624ae

Browse files
committed
fix: limit and test data
1 parent b72fdb4 commit 66624ae

File tree

4 files changed

+7
-21
lines changed

4 files changed

+7
-21
lines changed

src/containers/Nodes/NodesTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export function NodesTable({
8383
parentRef={parentRef}
8484
columns={columns}
8585
fetchData={getNodes}
86-
limit={30}
86+
limit={20}
8787
initialEntitiesCount={initialEntitiesCount}
8888
renderControls={renderControls}
8989
renderErrorMessage={renderPaginatedTableErrorMessage}

src/containers/Storage/StorageGroups/PaginatedStorageGroupsTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export const PaginatedStorageGroupsTable = ({
101101
parentRef={parentRef}
102102
columns={columns}
103103
fetchData={fetchData}
104-
limit={30}
104+
limit={20}
105105
initialEntitiesCount={initialEntitiesCount}
106106
renderControls={renderControls}
107107
renderErrorMessage={renderErrorMessage}

src/containers/Storage/StorageNodes/PaginatedStorageNodesTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export const PaginatedStorageNodesTable = ({
104104
columns={columns}
105105
fetchData={getStorageNodes}
106106
rowHeight={51}
107-
limit={30}
107+
limit={20}
108108
initialEntitiesCount={initialEntitiesCount}
109109
renderControls={renderControls}
110110
renderErrorMessage={renderErrorMessage}

src/containers/Storage/StorageNodes/getNodes.ts

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const getStorageNodes: FetchData<
4848
type,
4949
storage,
5050
limit,
51-
offset: 0,
51+
offset,
5252
sort,
5353
filter: searchValue,
5454
uptime: getUptimeParamValue(nodesUptimeFilter),
@@ -61,23 +61,9 @@ export const getStorageNodes: FetchData<
6161
fieldsRequired: dataFieldsRequired,
6262
});
6363
const preparedResponse = prepareStorageNodesResponse(response);
64-
65-
let mockedData = preparedResponse.nodes?.slice();
66-
67-
for (let i = 0; i < 4000; i++) {
68-
mockedData = mockedData?.concat(
69-
preparedResponse.nodes?.map((data, j) => ({
70-
...data,
71-
NodeId: data.NodeId + i * 2000 + j,
72-
Host: data.Host || String(i) + ',' + j,
73-
})) || [],
74-
);
75-
}
76-
const paginatedData = mockedData?.slice(offset, offset + limit);
77-
7864
return {
79-
data: paginatedData || [],
80-
found: mockedData?.length || 0,
81-
total: mockedData?.length || 0,
65+
data: preparedResponse.nodes || [],
66+
found: preparedResponse.found || 0,
67+
total: preparedResponse.total || 0,
8268
};
8369
};

0 commit comments

Comments
 (0)