(status?: number, hasError?: boolean)
| 93 | }; |
| 94 | |
| 95 | const getStatusColor = (status?: number, hasError?: boolean): string => { |
| 96 | if (hasError) return STATUS_COLORS.error; |
| 97 | if (!status) return 'text-muted-foreground'; |
| 98 | if (status >= 200 && status < 300) return STATUS_COLORS['2xx']; |
| 99 | if (status >= 300 && status < 400) return STATUS_COLORS['3xx']; |
| 100 | if (status >= 400 && status < 500) return STATUS_COLORS['4xx']; |
| 101 | if (status >= 500) return STATUS_COLORS['5xx']; |
| 102 | return 'text-muted-foreground'; |
| 103 | }; |
| 104 | |
| 105 | const formatDuration = (ms?: number): string => { |
| 106 | if (ms === undefined || ms < 0) return '-'; |
no outgoing calls
no test coverage detected