Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UI] round up team spend to 2 decimals + diversify legend for team spend #3210

Merged
merged 2 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions litellm/proxy/proxy_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -5552,10 +5552,12 @@ async def global_spend_per_tea():
# get the team_id for this entry
# get the spend for this entry
spend = row["total_spend"]
spend = round(spend, 2)
current_date_entries = spend_by_date[row_date]
current_date_entries[team_alias] = spend
else:
spend = row["total_spend"]
spend = round(spend, 2)
spend_by_date[row_date] = {team_alias: spend}

if team_alias in total_spend_per_team:
Expand Down
1 change: 1 addition & 0 deletions ui/litellm-dashboard/src/components/usage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ const UsagePage: React.FC<UsagePageProps> = ({
index="date"
categories={uniqueTeamIds}
yAxisWidth={80}
colors={["blue", "green", "yellow", "red", "purple"]}

stack={true}
/>
Expand Down
Loading