feat: charts

This commit is contained in:
archer
2023-07-17 11:04:27 +08:00
parent 246283ee1c
commit ed42bb6ce8
6 changed files with 34 additions and 18 deletions

View File

@@ -48,6 +48,6 @@ export const triggerModelCollection = (appId: string) =>
export const getAppTotalUsage = (data: { appId: string }) =>
POST<{ total: number; date: Date }[]>(`/app/data/totalUsage`, {
...data,
start: addDays(new Date(), -7),
end: new Date()
start: addDays(new Date(), -13).setHours(0, 0, 0, 0),
end: addDays(new Date(), 1).setHours(0, 0, 0, 0)
});