fix(usage): fetch full trend/export series via page=-1
Trend charts and breakdown exports need the complete date series. The old perPage=10000 workaround (and the missing page param on the token trend, which fell back to perPage=20) dropped low-traffic — often most recent — buckets, leaving gaps in the charts (#5690). Send page=-1 (the backend's no-pagination sentinel) for the token trend, the storage/instances trend charts and table exports, the resource export dialog, and the summary-tab date trends.
This commit is contained in:
@@ -163,11 +163,12 @@ const ResourceExportData: React.FC<ResourceExportDataProps> = (props) => {
|
||||
setPageParams({ page, perPage });
|
||||
};
|
||||
|
||||
// Export the full filtered set, not just the visible page.
|
||||
// Export the full filtered set, not just the visible page. ``page: -1`` is
|
||||
// the backend's no-pagination sentinel (perPage is then ignored).
|
||||
const handleSubmit = async () => {
|
||||
setExporting(true);
|
||||
try {
|
||||
const res = await queryFn(buildRequest(1, 10000));
|
||||
const res = await queryFn(buildRequest(-1, INITIAL_PAGE.perPage));
|
||||
exportBreakdownRows(
|
||||
res.items ?? [],
|
||||
toExportColumns(columns),
|
||||
|
||||
Reference in New Issue
Block a user