mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
Litellm dev 01 23 2025 p2 (#7962)
* fix(ui/): revert user team key view * fix(view_key_table.tsx): fix default team view - show all personal keys * fix(navbar.tsx): fix custom logo Fixes https://github.com/BerriAI/litellm/issues/7895 --------- Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
This commit is contained in:
parent
70a3683552
commit
744b7709ca
7 changed files with 14 additions and 7 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -70,3 +70,4 @@ venv/
|
||||||
tests/local_testing/log.txt
|
tests/local_testing/log.txt
|
||||||
|
|
||||||
.codegpt
|
.codegpt
|
||||||
|
litellm/proxy/_new_new_secret_config.yaml
|
||||||
|
|
|
@ -12,5 +12,6 @@ model_list:
|
||||||
timeout: 2
|
timeout: 2
|
||||||
num_retries: 0
|
num_retries: 0
|
||||||
|
|
||||||
|
|
||||||
litellm_settings:
|
litellm_settings:
|
||||||
success_callback: ["langfuse"]
|
success_callback: ["langfuse"]
|
Binary file not shown.
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 49 KiB |
|
@ -84,7 +84,7 @@ const DashboardTeam: React.FC<DashboardTeamProps> = ({
|
||||||
value={String(index)}
|
value={String(index)}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setSelectedTeam(team);
|
setSelectedTeam(team);
|
||||||
setKeys(team["keys"]);
|
// setKeys(team["keys"]);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{team["team_alias"]}
|
{team["team_alias"]}
|
||||||
|
|
|
@ -90,8 +90,13 @@ const Navbar: React.FC<NavbarProps> = ({
|
||||||
{/* Left side - Just Logo */}
|
{/* Left side - Just Logo */}
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<Link href="/" className="flex items-center">
|
<Link href="/" className="flex items-center">
|
||||||
<span className="text-xl">🚅</span>
|
<button className="text-gray-800 rounded text-center">
|
||||||
<span className="ml-2 text-base font-medium text-gray-700">LiteLLM</span>
|
<img
|
||||||
|
src={imageUrl}
|
||||||
|
alt="LiteLLM Brand"
|
||||||
|
className="h-10 w-40 object-contain"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -206,14 +206,14 @@ const UserDashboard: React.FC<UserDashboardProps> = ({
|
||||||
|
|
||||||
setUserSpendData(response["user_info"]);
|
setUserSpendData(response["user_info"]);
|
||||||
console.log(`userSpendData: ${JSON.stringify(userSpendData)}`)
|
console.log(`userSpendData: ${JSON.stringify(userSpendData)}`)
|
||||||
|
setKeys(response["keys"]); // Assuming this is the correct path to your data
|
||||||
const teamsArray = [...response["teams"]];
|
const teamsArray = [...response["teams"]];
|
||||||
if (teamsArray.length > 0) {
|
if (teamsArray.length > 0) {
|
||||||
console.log(`response['teams']: ${JSON.stringify(teamsArray)}`);
|
console.log(`response['teams']: ${JSON.stringify(teamsArray)}`);
|
||||||
setSelectedTeam(teamsArray[0]);
|
setSelectedTeam(teamsArray[0]);
|
||||||
setKeys(teamsArray[0]["keys"]); // Assuming this is the correct path to your data
|
|
||||||
} else {
|
} else {
|
||||||
setSelectedTeam(defaultTeam);
|
setSelectedTeam(defaultTeam);
|
||||||
setKeys(response["keys"]); // Assuming this is the correct path to your data
|
|
||||||
}
|
}
|
||||||
sessionStorage.setItem(
|
sessionStorage.setItem(
|
||||||
"userData" + userID,
|
"userData" + userID,
|
||||||
|
|
|
@ -166,7 +166,7 @@ const ViewKeyTable: React.FC<ViewKeyTableProps> = ({
|
||||||
});
|
});
|
||||||
|
|
||||||
// If no team is selected, show all accessible keys
|
// If no team is selected, show all accessible keys
|
||||||
if (!selectedTeam && data) {
|
if ((!selectedTeam || selectedTeam.team_alias === "Default Team") && data) {
|
||||||
const personalKeys = data.filter(key => !key.team_id || key.team_id === "default-team");
|
const personalKeys = data.filter(key => !key.team_id || key.team_id === "default-team");
|
||||||
const adminTeamKeys = teams
|
const adminTeamKeys = teams
|
||||||
.filter(team => isUserTeamAdmin(team))
|
.filter(team => isUserTeamAdmin(team))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue