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 (