From 459890c98621002065d1a96aeed691c420aff119 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 23 Apr 2026 17:17:07 +0000 Subject: [PATCH] feat(ui): team/LoggingSettings to shadcn - antd Divider/Tooltip + @ant-design InfoCircleOutlined + @tremor Button/Card/TextInput + @heroicons Plus/Trash/Cog/Ban \u2192 shadcn Button/Card/Input/Tooltip + lucide Ban/Info/Plus/Settings/Trash2. - antd Select preserved for mode='multiple' + optionLabelProp='label' + custom Option renders. - Card decoration='top' decorationColor='blue' \u2192 border-t-2 border-t-blue-500 (categorical accent, file added to .eslintrc). - Sensitive/Number chips + success/failure/blue dots keep categorical amber/emerald/red/blue palette. Gates: TS \u2713 | Build \u2713. Co-authored-by: yuneng-jiang --- ui/litellm-dashboard/.eslintrc.json | 1 + .../src/components/team/LoggingSettings.tsx | 287 +++++++++++------- 2 files changed, 183 insertions(+), 105 deletions(-) diff --git a/ui/litellm-dashboard/.eslintrc.json b/ui/litellm-dashboard/.eslintrc.json index 5299c64ccd0..8a059646c36 100644 --- a/ui/litellm-dashboard/.eslintrc.json +++ b/ui/litellm-dashboard/.eslintrc.json @@ -72,6 +72,7 @@ "src/components/policies/policy_templates.tsx", "src/components/mcp_tools/mcp_server_view.tsx", "src/components/claude_code_plugins/plugin_info.tsx", + "src/components/team/LoggingSettings.tsx", "src/components/permissions/VectorStorePermissions.tsx", "src/components/permissions/AgentPermissions.tsx", "src/components/permissions/MCPServerPermissions.tsx", diff --git a/ui/litellm-dashboard/src/components/team/LoggingSettings.tsx b/ui/litellm-dashboard/src/components/team/LoggingSettings.tsx index 56d2e23a90c..d2d7cc65f89 100644 --- a/ui/litellm-dashboard/src/components/team/LoggingSettings.tsx +++ b/ui/litellm-dashboard/src/components/team/LoggingSettings.tsx @@ -1,11 +1,22 @@ /* eslint-disable @next/next/no-img-element */ /* eslint-disable react/no-unescaped-entities */ import React from "react"; -import { Select, Tooltip, Divider } from "antd"; -import { InfoCircleOutlined } from "@ant-design/icons"; -import { Button, Card, TextInput } from "@tremor/react"; -import { PlusIcon, TrashIcon, CogIcon, BanIcon } from "@heroicons/react/outline"; -import { callbackInfo, callback_map, mapDisplayToInternalNames } from "../callback_info_helpers"; +import { Select } from "antd"; +import { Button } from "@/components/ui/button"; +import { Card } from "@/components/ui/card"; +import { Input } from "@/components/ui/input"; +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from "@/components/ui/tooltip"; +import { Ban, Info, Plus, Settings, Trash2 } from "lucide-react"; +import { + callbackInfo, + callback_map, + mapDisplayToInternalNames, +} from "../callback_info_helpers"; import NumericalInput from "../shared/numerical_input"; const { Option } = Select; @@ -61,7 +72,12 @@ const LoggingSettings: React.FC = ({ handleChange(newValue); }; - const updateLoggingConfig = (index: number, field: keyof LoggingConfig, newValue: any) => { + const updateLoggingConfig = ( + index: number, + field: keyof LoggingConfig, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + newValue: any, + ) => { const updatedConfigs = [...value]; if (field === "callback_name") { // Convert display name to callback value and reset callback_vars when callback changes @@ -105,47 +121,66 @@ const LoggingSettings: React.FC = ({ if (Object.keys(dynamicParams).length === 0) return null; return ( -
+
-
+
- Integration Parameters + + Integration Parameters +
{Object.entries(dynamicParams).map(([paramName, paramType]) => (
-
@@ -160,15 +195,27 @@ const LoggingSettings: React.FC = ({ {/* Disabled Callbacks Section */}
- - Disabled Callbacks - - - + + + Disabled Callbacks + + + + + + + + Select callbacks to disable for this key. Disabled callbacks + will not receive any logging data. + + +
- + -
- Select callbacks that should be disabled for this key. These callbacks will not receive any logging data. +
+ Select callbacks that should be disabled for this key. These + callbacks will not receive any logging data.
- +
{/* Logging Integrations Section */}
- - Logging Integrations - - - + + + Logging Integrations + + + + + + + + Configure callback logging integrations for this team. + + +
@@ -249,67 +306,79 @@ const LoggingSettings: React.FC = ({ return (
- {logoUrl && {callbackDisplayName}} - {callbackDisplayName || "New Integration"} Configuration + {logoUrl && ( + {callbackDisplayName} + )} + + {callbackDisplayName || "New Integration"} Configuration +
- + updateLoggingConfig(index, "callback_type", value)} + onChange={(value) => + updateLoggingConfig(index, "callback_type", value) + } className="w-full" > @@ -353,10 +426,14 @@ const LoggingSettings: React.FC = ({
{value.length === 0 && ( -
- -
No logging integrations configured
-
Click "Add Integration" to configure logging for this team
+
+ +
+ No logging integrations configured +
+
+ Click "Add Integration" to configure logging for this team +
)}