diff --git a/ui/src/components/ExecutionDiagram/tabs/LogTab.module.css b/ui/src/components/ExecutionDiagram/tabs/LogTab.module.css new file mode 100644 index 00000000..d9326afe --- /dev/null +++ b/ui/src/components/ExecutionDiagram/tabs/LogTab.module.css @@ -0,0 +1,97 @@ +/* ========================================================================== + LOG TAB — STYLES + ========================================================================== */ +.container { + display: flex; + flex-direction: column; + height: 100%; + min-height: 0; +} + +.filterBar { + padding: 6px 10px; + border-bottom: 1px solid var(--border-subtle); +} + +.filterInput { + width: 100%; + padding: 4px 8px; + font-size: 12px; + border: 1px solid var(--border-subtle); + border-radius: var(--radius-sm); + background: var(--bg-surface); + color: var(--text-primary); + outline: none; + font-family: var(--font-body); +} + +.logList { + flex: 1; + overflow-y: auto; + font-size: 12px; + font-family: var(--font-mono); +} + +.logTable { + width: 100%; + border-collapse: collapse; +} + +.logRow { + border-bottom: 1px solid var(--border-subtle); +} + +.timestampCell { + padding: 3px 6px; + white-space: nowrap; + color: var(--text-muted); +} + +.levelCell { + padding: 3px 4px; + white-space: nowrap; + font-weight: 600; + width: 40px; +} + +.levelError { + color: var(--error); +} + +.levelWarn { + color: var(--warning); +} + +.levelDebug { + color: var(--text-muted); +} + +.levelTrace { + color: var(--text-faint, var(--text-muted)); +} + +.levelDefault { + color: var(--text-secondary); +} + +.messageCell { + padding: 3px 6px; + color: var(--text-primary); + word-break: break-word; +} + +.footer { + padding: 6px 10px; + border-top: 1px solid var(--border-subtle); + font-size: 12px; + text-align: center; +} + +.openLogsButton { + background: none; + border: none; + color: var(--amber); + cursor: pointer; + font-size: 12px; + font-family: var(--font-body); +} diff --git a/ui/src/components/ExecutionDiagram/tabs/LogTab.tsx b/ui/src/components/ExecutionDiagram/tabs/LogTab.tsx index 700edcb8..10d6b4a8 100644 --- a/ui/src/components/ExecutionDiagram/tabs/LogTab.tsx +++ b/ui/src/components/ExecutionDiagram/tabs/LogTab.tsx @@ -2,7 +2,8 @@ import { useState, useMemo } from 'react'; import { useNavigate } from 'react-router'; import { useApplicationLogs } from '../../../api/queries/logs'; import type { LogEntryResponse } from '../../../api/queries/logs'; -import styles from '../ExecutionDiagram.module.css'; +import logStyles from './LogTab.module.css'; +import diagramStyles from '../ExecutionDiagram.module.css'; interface LogTabProps { applicationId: string; @@ -10,13 +11,13 @@ interface LogTabProps { processorId: string | null; } -function levelColor(level: string): string { +function levelClass(level: string): string { switch (level?.toUpperCase()) { - case 'ERROR': return 'var(--error)'; - case 'WARN': return 'var(--warning)'; - case 'DEBUG': return 'var(--text-muted)'; - case 'TRACE': return 'var(--text-faint, var(--text-muted))'; - default: return 'var(--text-secondary)'; + case 'ERROR': return logStyles.levelError; + case 'WARN': return logStyles.levelWarn; + case 'DEBUG': return logStyles.levelDebug; + case 'TRACE': return logStyles.levelTrace; + default: return logStyles.levelDefault; } } @@ -65,48 +66,38 @@ export function LogTab({ applicationId, exchangeId, processorId }: LogTabProps) }, [logs, processorId, filter]); if (isLoading) { - return
| + | ||||
| {formatTime(entry.timestamp)} | -+ | {entry.level} | -+ | {entry.message} |