fix(usage): carry full filter set in breakdown tables and fix double fetch
- breakdown sub-tables now send all active filters (route/user/api_key), matching the trend chart - summary tab filters the token trend by user and unions user options from both meta APIs (deduped by id) - stabilize the filters reference so meta load no longer retriggers a second fetch on mount
This commit is contained in:
@@ -96,3 +96,12 @@ export interface UsageMeta {
|
||||
}
|
||||
|
||||
export type FilterOptionType = Omit<UsageFilterItem, 'label' | 'deleted'>;
|
||||
|
||||
// The full breakdown filter set (route / user / api_key). Every breakdown
|
||||
// table sends all active dimensions — matching the trend chart — so e.g. a
|
||||
// user filter narrows the Models table too, not only the Users table.
|
||||
export type BreakdownFilters = {
|
||||
routes?: FilterOptionType[];
|
||||
users?: FilterOptionType[];
|
||||
api_keys?: FilterOptionType[];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user