mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
Merge pull request #3692 from BerriAI/ui_fix_start_end_time
[UI] End User Spend - Fix Timezone diff bug
This commit is contained in:
commit
c397114591
2 changed files with 12 additions and 1 deletions
|
|
@ -675,7 +675,6 @@ export const tagsSpendLogsCall = async (
|
|||
});
|
||||
if (!response.ok) {
|
||||
const errorData = await response.text();
|
||||
message.error(errorData, 10);
|
||||
throw new Error("Network response was not ok");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -142,6 +142,12 @@ const UsagePage: React.FC<UsagePageProps> = ({
|
|||
return;
|
||||
}
|
||||
|
||||
// the endTime put it to the last hour of the selected date
|
||||
endTime.setHours(23, 59, 59, 999);
|
||||
|
||||
// startTime put it to the first hour of the selected date
|
||||
startTime.setHours(0, 0, 0, 0);
|
||||
|
||||
console.log("uiSelectedKey", uiSelectedKey);
|
||||
|
||||
let newTopUserData = await adminTopEndUsersCall(
|
||||
|
|
@ -160,6 +166,12 @@ const UsagePage: React.FC<UsagePageProps> = ({
|
|||
return;
|
||||
}
|
||||
|
||||
// the endTime put it to the last hour of the selected date
|
||||
endTime.setHours(23, 59, 59, 999);
|
||||
|
||||
// startTime put it to the first hour of the selected date
|
||||
startTime.setHours(0, 0, 0, 0);
|
||||
|
||||
let top_tags = await tagsSpendLogsCall(accessToken, startTime.toISOString(), endTime.toISOString());
|
||||
setTopTagsData(top_tags.spend_per_tag);
|
||||
console.log("Tag spend data updated successfully");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue