diff --git a/ui/litellm-dashboard/.eslintrc.json b/ui/litellm-dashboard/.eslintrc.json
index 0f6e76f71e3..cc887fe13b6 100644
--- a/ui/litellm-dashboard/.eslintrc.json
+++ b/ui/litellm-dashboard/.eslintrc.json
@@ -31,7 +31,8 @@
"src/components/common_components/IconActionButton/TableIconActionButtons/TableIconActionButton.tsx",
"src/components/GuardrailSettingsView.tsx",
"src/components/DebugWarningBanner.tsx",
- "src/components/SCIM.tsx"
+ "src/components/SCIM.tsx",
+ "src/components/logging_settings_view.tsx"
],
"rules": {
"litellm-ui/no-banned-ui-imports": "off",
diff --git a/ui/litellm-dashboard/src/components/logging_settings_view.tsx b/ui/litellm-dashboard/src/components/logging_settings_view.tsx
index 079711d196d..e88ba230590 100644
--- a/ui/litellm-dashboard/src/components/logging_settings_view.tsx
+++ b/ui/litellm-dashboard/src/components/logging_settings_view.tsx
@@ -1,7 +1,12 @@
import React from "react";
-import { Tag } from "antd";
-import { CogIcon, BanIcon } from "@heroicons/react/outline";
-import { callbackInfo, callback_map, reverse_callback_map } from "./callback_info_helpers";
+import { Badge } from "@/components/ui/badge";
+import { Ban, Settings as Cog } from "lucide-react";
+import {
+ callbackInfo,
+ callback_map,
+ reverse_callback_map,
+} from "./callback_info_helpers";
+import { cn } from "@/lib/utils";
interface LoggingConfig {
callback_name: string;
@@ -23,21 +28,22 @@ export function LoggingSettingsView({
className = "",
}: LoggingSettingsViewProps) {
const getLoggingDisplayName = (callbackName: string) => {
- // Find the display name for the callback
- const callbackDisplayName = Object.entries(callback_map).find(([_, value]) => value === callbackName)?.[0];
+ const callbackDisplayName = Object.entries(callback_map).find(
+ ([, value]) => value === callbackName,
+ )?.[0];
return callbackDisplayName || callbackName;
};
- const getEventTypeColor = (eventType: string): string | undefined => {
+ const getEventTypeBadgeClass = (eventType: string): string => {
switch (eventType) {
case "success":
- return "green";
+ return "bg-emerald-100 text-emerald-800 dark:bg-emerald-950/40 dark:text-emerald-300";
case "failure":
- return "red";
+ return "bg-red-100 text-red-800 dark:bg-red-950/40 dark:text-red-300";
case "success_and_failure":
- return "blue";
+ return "bg-blue-100 text-blue-800 dark:bg-blue-950/40 dark:text-blue-300";
default:
- return undefined;
+ return "";
}
};
@@ -56,14 +62,15 @@ export function LoggingSettingsView({
const content = (
- {/* Logging Integrations Section */}
-
- Logging Integrations
-
+
+
+ Logging Integrations
+
+
{loggingConfigs.length}
-
+
{loggingConfigs.length > 0 ? (
@@ -71,84 +78,98 @@ export function LoggingSettingsView({
{loggingConfigs.map((config, index) => {
const displayName = getLoggingDisplayName(config.callback_name);
const logoUrl = callbackInfo[displayName]?.logo;
-
return (
{logoUrl ? (
-
+
) : (
-
+
)}
- {displayName}
-
- {Object.keys(config.callback_vars).length} parameters configured
+
+ {displayName}
+
+
+ {Object.keys(config.callback_vars).length} parameters
+ configured
-
+
{getEventTypeLabel(config.callback_type)}
-
+
);
})}
) : (
-
-
-
No logging integrations configured
+
+
+
+ No logging integrations configured
+
)}
- {/* Disabled Callbacks Section */}
-
- Disabled Callbacks
-
- {disabledCallbacks.length}
-
+
+
+ Disabled Callbacks
+
+ {disabledCallbacks.length}
{disabledCallbacks.length > 0 ? (
{disabledCallbacks.map((callbackName, index) => {
- // Handle both display names and internal values
- const displayName = reverse_callback_map[callbackName] || callbackName;
+ const displayName =
+ reverse_callback_map[callbackName] || callbackName;
const logoUrl = callbackInfo[displayName]?.logo;
-
return (
{logoUrl ? (
-
+
) : (
-
+
)}
- {displayName}
- Disabled for this key
+
+ {displayName}
+
+
+ Disabled for this key
+
-
- Disabled
-
+
Disabled
);
})}
) : (
-
-
-
No callbacks disabled
+
+
+
+ No callbacks disabled
+
)}
@@ -157,11 +178,18 @@ export function LoggingSettingsView({
if (variant === "card") {
return (
-
+
- Logging Settings
-
+
+ Logging Settings
+
+
Active logging integrations and disabled callbacks for this key
@@ -172,8 +200,10 @@ export function LoggingSettingsView({
}
return (
-
-
Logging Settings
+
+
+ Logging Settings
+
{content}
);
diff --git a/ui/litellm-dashboard/src/components/onboarding_link.tsx b/ui/litellm-dashboard/src/components/onboarding_link.tsx
index 7eb337a970a..56ad57cac7d 100644
--- a/ui/litellm-dashboard/src/components/onboarding_link.tsx
+++ b/ui/litellm-dashboard/src/components/onboarding_link.tsx
@@ -1,7 +1,13 @@
import React from "react";
-import { Button, Modal, Typography } from "antd";
+import { Button } from "@/components/ui/button";
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogHeader,
+ DialogTitle,
+} from "@/components/ui/dialog";
import { CopyToClipboard } from "react-copy-to-clipboard";
-import { Text } from "@tremor/react";
import NotificationsManager from "./molecules/notifications_manager";
export interface InvitationLink {
@@ -19,7 +25,9 @@ export interface InvitationLink {
interface OnboardingProps {
isInvitationLinkModalVisible: boolean;
- setIsInvitationLinkModalVisible: React.Dispatch
>;
+ setIsInvitationLinkModalVisible: React.Dispatch<
+ React.SetStateAction
+ >;
baseUrl: string;
invitationLinkData: InvitationLink | null;
modalType?: "invitation" | "resetPassword";
@@ -32,23 +40,13 @@ export default function OnboardingModal({
invitationLinkData,
modalType = "invitation",
}: OnboardingProps) {
- const { Title, Paragraph } = Typography;
- const handleInvitationOk = () => {
- setIsInvitationLinkModalVisible(false);
- };
-
- const handleInvitationCancel = () => {
- setIsInvitationLinkModalVisible(false);
- };
+ const handleClose = () => setIsInvitationLinkModalVisible(false);
const getInvitationUrl = () => {
- if (!baseUrl) {
- return "";
- }
+ if (!baseUrl) return "";
const baseUrlObj = new URL(baseUrl);
- const basePath = baseUrlObj.pathname; // This will be "/litellm" or ""
+ const basePath = baseUrlObj.pathname;
const path = basePath && basePath !== "/" ? `${basePath}/ui` : "ui";
- // Get the path from the base URL
if (invitationLinkData?.has_user_setup_sso) {
return new URL(path, baseUrl).toString();
}
@@ -56,41 +54,54 @@ export default function OnboardingModal({
if (modalType === "resetPassword") {
urlPath += "&action=reset_password";
}
- const url = new URL(urlPath, baseUrl).toString();
- return url;
+ return new URL(urlPath, baseUrl).toString();
};
return (
- (!o ? handleClose() : undefined)}
>
-
- {modalType === "invitation"
- ? "Copy and send the generated link to onboard this user to the proxy."
- : "Copy and send the generated link to the user to reset their password."}
-
-
- User ID
- {invitationLinkData?.user_id}
-
-
- {modalType === "invitation" ? "Invitation Link" : "Reset Password Link"}
-
- {getInvitationUrl()}
-
-
-
- NotificationsManager.success("Copied!")}>
-
- {modalType === "invitation" ? "Copy invitation link" : "Copy password reset link"}
-
-
-
-
+
+
+
+ {modalType === "invitation"
+ ? "Invitation Link"
+ : "Reset Password Link"}
+
+
+ {modalType === "invitation"
+ ? "Copy and send the generated link to onboard this user to the proxy."
+ : "Copy and send the generated link to the user to reset their password."}
+
+
+
+ User ID
+ {invitationLinkData?.user_id}
+
+
+
+ {modalType === "invitation"
+ ? "Invitation Link"
+ : "Reset Password Link"}
+
+
+ {getInvitationUrl()}
+
+
+
+ NotificationsManager.success("Copied!")}
+ >
+
+ {modalType === "invitation"
+ ? "Copy invitation link"
+ : "Copy password reset link"}
+
+
+
+
+
);
}