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:
michelia
2026-06-27 22:27:42 +08:00
committed by jialin
parent 8b34f68824
commit abe705c034
5 changed files with 22 additions and 6 deletions
+6
View File
@@ -299,16 +299,21 @@ const SummaryTab: React.FC = () => {
filters: creatorFilter
}),
// Date-bucketed trends: fetch the whole series via the no-pagination
// sentinel (page: -1). A metric-desc page would drop low-traffic (often
// most recent) buckets and leave gaps in the chart.
fetchTokenSeries({
...commonParams,
metric: 'total_tokens',
group_by: ['date'],
granularity,
page: -1,
filters: {}
}),
fetchComputeBreakdown({
...paginationParams,
page: -1,
group_by: ['date'],
granularity,
filters: creatorFilter
@@ -316,6 +321,7 @@ const SummaryTab: React.FC = () => {
fetchStorageByDate({
...paginationParams,
page: -1,
group_by: ['date'],
granularity,
filters: creatorFilter