From 2014bcf9d80e89b43e65cc2db70952c71ddf5466 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Fri, 30 Jan 2026 15:44:49 -0800 Subject: [PATCH] fixes ui --- .../view_logs/CostBreakdownViewer.tsx | 2 +- .../LogDetailsDrawer/LogDetailsDrawer.tsx | 134 ++++++++---------- 2 files changed, 62 insertions(+), 74 deletions(-) diff --git a/ui/litellm-dashboard/src/components/view_logs/CostBreakdownViewer.tsx b/ui/litellm-dashboard/src/components/view_logs/CostBreakdownViewer.tsx index affe28e0b2..7a02b89891 100644 --- a/ui/litellm-dashboard/src/components/view_logs/CostBreakdownViewer.tsx +++ b/ui/litellm-dashboard/src/components/view_logs/CostBreakdownViewer.tsx @@ -59,7 +59,7 @@ export const CostBreakdownViewer: React.FC = ({ } return ( -
+
diff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailsDrawer.tsx b/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailsDrawer.tsx index 7b6e304e97..1d9af26535 100644 --- a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailsDrawer.tsx +++ b/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailsDrawer.tsx @@ -1,6 +1,7 @@ import { useState } from "react"; -import { Drawer, Typography, Button, Descriptions, Card, Tag, Tabs, Alert, message, Collapse } from "antd"; -import { CopyOutlined, DownOutlined } from "@ant-design/icons"; +import { Drawer, Typography, Button, Descriptions, Card, Tag, Tabs, Alert, message } from "antd"; +import { CopyOutlined } from "@ant-design/icons"; +import { Accordion, AccordionHeader, AccordionBody } from "@tremor/react"; import moment from "moment"; import { LogEntry } from "../columns"; import { formatNumberWithCommas } from "@/utils/dataUtils"; @@ -150,7 +151,7 @@ export function LogDetailsDrawer({ showIcon message="Request Failed" description={} - style={{ marginBottom: SPACING_XLARGE }} + className="mb-6" /> )} @@ -160,7 +161,7 @@ export function LogDetailsDrawer({ )} {/* Request Details Section */} -
+
{logEntry.model} @@ -191,7 +192,11 @@ export function LogDetailsDrawer({ {/* Configuration Info Message - Show when data is missing */} - + {missingData && ( +
+ +
+ )} {/* Request/Response JSON - Collapsible */} }) { return ( -
+
Tags @@ -274,7 +279,7 @@ function MetricsSection({ logEntry, metadata }: { logEntry: LogEntry; metadata: metadata.additional_usage_values.cache_read_input_tokens > 0); return ( -
+
@@ -338,7 +343,6 @@ function RequestResponseSection({ getFormattedResponse, }: RequestResponseSectionProps) { const [activeTab, setActiveTab] = useState(TAB_REQUEST); - const [isOpen, setIsOpen] = useState(true); const handleCopy = () => { const data = activeTab === TAB_REQUEST ? getRawRequest() : getFormattedResponse(); @@ -347,78 +351,62 @@ function RequestResponseSection({ }; return ( -
- setIsOpen(keys.includes("request-response"))} - expandIcon={({ isActive }) => } - bordered={false} - items={[ - { - key: "request-response", - label: Request & Response, - children: ( - setActiveTab(key as typeof TAB_REQUEST | typeof TAB_RESPONSE)} - tabBarExtraContent={ - - } - items={[ - { - key: TAB_REQUEST, - label: "Request", - children: ( -
- +
+ + +

Request & Response

+
+ + setActiveTab(key as typeof TAB_REQUEST | typeof TAB_RESPONSE)} + tabBarExtraContent={ + + } + items={[ + { + key: TAB_REQUEST, + label: "Request", + children: ( +
+ +
+ ), + }, + { + key: TAB_RESPONSE, + label: "Response", + children: ( +
+ {hasResponse ? ( + + ) : ( +
+ Response data not available
- ), - }, - { - key: TAB_RESPONSE, - label: "Response", - children: ( -
- {hasResponse ? ( - - ) : ( -
- Response data not available -
- )} -
- ), - }, - ]} - /> - ), - }, - ]} - styles={{ - header: { - padding: "16px", - borderBottom: "1px solid #f0f0f0", - }, - body: { - padding: 0, - }, - }} - /> + )} +
+ ), + }, + ]} + /> +
+
); } function MetadataSection({ metadata, onCopy }: { metadata: Record; onCopy: (data: string) => void }) { return ( -
+