From d0cf40b7664cbfb7439f504f7eb4b490fde4f5f3 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Thu, 9 Jul 2026 16:52:31 -0700 Subject: [PATCH] fix(ui): clean relay drawer lint --- .../LogDetailsDrawer/LogDetailsDrawer.tsx | 38 +++++++++++-------- 1 file changed, 22 insertions(+), 16 deletions(-) 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 ca75df52946..e3472c16a78 100644 --- a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailsDrawer.tsx +++ b/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailsDrawer.tsx @@ -50,12 +50,21 @@ function TraceEventRow({ row, isSelected, onClick }: TraceEventRowProps) { const isMcp = MCP_CALL_TYPES.includes(row.call_type); const isAgent = AGENT_CALL_TYPES.includes(row.call_type); const isRelay = RELAY_CALL_TYPES.includes(row.call_type); - const durationValue = - row.request_duration_ms != null - ? (row.request_duration_ms / 1000).toFixed(3) - : row.startTime && row.endTime - ? ((Date.parse(row.endTime) - Date.parse(row.startTime)) / 1000).toFixed(3) - : "-"; + let durationValue = "-"; + if (row.request_duration_ms != null) { + durationValue = (row.request_duration_ms / 1000).toFixed(3); + } else if (row.startTime && row.endTime) { + durationValue = ((Date.parse(row.endTime) - Date.parse(row.startTime)) / 1000).toFixed(3); + } + + let eventIcon = ; + if (isMcp) { + eventIcon = ; + } else if (isAgent) { + eventIcon = ; + } else if (isRelay) { + eventIcon = ; + } return (