Skip to content

Commit 825a040

Browse files
committed
moved virtual-key-refactor to its own branch
1 parent 2b0df22 commit 825a040

File tree

32 files changed

+37
-3164
lines changed

32 files changed

+37
-3164
lines changed

ui/litellm-dashboard/src/app/(dashboard)/components/modals/CreateUserModal.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ import {
2929
} from "@/components/networking";
3030
import { getModelDisplayName } from "@/components/key_team_helpers/fetch_available_models_team_key";
3131
import BulkCreateUsersButton from "@/components/bulk_create_users_button";
32-
import { fetchTeams } from "@/app/(dashboard)/virtual-keys/networking";
33-
import useTeams from "@/app/(dashboard)/virtual-keys/hooks/useTeams";
32+
import useTeams from "@/app/(dashboard)/hooks/useTeams";
3433
import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
3534

3635
// Helper function to generate UUID compatible across all environments

ui/litellm-dashboard/src/app/(dashboard)/hooks/useAuthorized.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const useAuthorized = () => {
3434
token: token,
3535
accessToken: decoded?.key ?? null,
3636
userId: decoded?.user_id ?? null,
37+
userEmail: decoded?.user_email ?? null,
3738
userRole: decoded?.user_role ?? null,
3839
premiumUser: decoded?.premium_user ?? null,
3940
disabledPersonalKeyCreation: decoded?.disabled_non_admin_personal_key_creation ?? null,

ui/litellm-dashboard/src/app/(dashboard)/virtual-keys/hooks/useTeams.tsx renamed to ui/litellm-dashboard/src/app/(dashboard)/hooks/useTeams.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useEffect, useState } from "react";
2-
import { fetchTeams } from "@/app/(dashboard)/virtual-keys/networking";
32
import { Team } from "@/components/key_team_helpers/key_list";
43
import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
4+
import { fetchTeams } from "@/app/(dashboard)/networking";
55

66
const useTeams = () => {
77
const [teams, setTeams] = useState<Team[] | null>([]);

ui/litellm-dashboard/src/app/(dashboard)/logs/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import SpendLogsTable from "@/components/view_logs";
44
import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
5-
import useTeams from "@/app/(dashboard)/virtual-keys/hooks/useTeams";
5+
import useTeams from "@/app/(dashboard)/hooks/useTeams";
66
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
77

88
const LogsPage = () => {

ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import ModelDashboard from "@/components/templates/model_dashboard";
44
import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
5-
import useTeams from "@/app/(dashboard)/virtual-keys/hooks/useTeams";
5+
import useTeams from "@/app/(dashboard)/hooks/useTeams";
66
import { useState } from "react";
77

88
const ModelsAndEndpointsPage = () => {
File renamed without changes.

ui/litellm-dashboard/src/app/(dashboard)/settings/admin-settings/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import AdminPanel from "@/components/admins";
44
import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
55
import { useState } from "react";
66
import { Team } from "@/components/key_team_helpers/key_list";
7-
import useTeams from "@/app/(dashboard)/virtual-keys/hooks/useTeams";
7+
import useTeams from "@/app/(dashboard)/hooks/useTeams";
88

99
const AdminSettings = () => {
1010
const { teams, setTeams } = useTeams();

ui/litellm-dashboard/src/app/(dashboard)/teams/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import Teams from "@/components/teams";
44
import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
5-
import useTeams from "@/app/(dashboard)/virtual-keys/hooks/useTeams";
5+
import useTeams from "@/app/(dashboard)/hooks/useTeams";
66
import { useEffect, useState } from "react";
77
import { Organization } from "@/components/networking";
88
import { fetchOrganizations } from "@/components/organizations";

ui/litellm-dashboard/src/app/(dashboard)/usage/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import NewUsagePage from "@/components/new_usage";
44
import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
5-
import useTeams from "@/app/(dashboard)/virtual-keys/hooks/useTeams";
5+
import useTeams from "@/app/(dashboard)/hooks/useTeams";
66

77
const UsagePage = () => {
88
const { accessToken, userRole, userId, premiumUser } = useAuthorized();

ui/litellm-dashboard/src/app/(dashboard)/users/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import ViewUserDashboard from "@/components/view_users";
44
import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
5-
import useTeams from "@/app/(dashboard)/virtual-keys/hooks/useTeams";
5+
import useTeams from "@/app/(dashboard)/hooks/useTeams";
66
import { useState } from "react";
77
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
88

0 commit comments

Comments
 (0)