From c6267eb37d2efd6ea38639fbc573ad84793203cf Mon Sep 17 00:00:00 2001 From: Emir Karabeg Date: Fri, 31 Jan 2025 18:39:19 -0800 Subject: [PATCH] Added console support for warning --- .../console-entry/console-entry.tsx | 25 ++++++++++++++++--- stores/console/types.ts | 1 + 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/app/w/components/console/components/console-entry/console-entry.tsx b/app/w/components/console/components/console-entry/console-entry.tsx index 048f30c598..b45e9ff5ce 100644 --- a/app/w/components/console/components/console-entry/console-entry.tsx +++ b/app/w/components/console/components/console-entry/console-entry.tsx @@ -6,6 +6,7 @@ import { Calendar, CheckCircle2, AlertCircle, + AlertTriangle, } from 'lucide-react' import { ConsoleEntry as ConsoleEntryType } from '@/stores/console/types' import { JSONView } from '../json-view/json-view' @@ -36,6 +37,8 @@ export function ConsoleEntry({ entry, consoleWidth }: ConsoleEntryProps) { const statusIcon = entry.error ? ( + ) : entry.warning ? ( + ) : ( ) @@ -43,9 +46,13 @@ export function ConsoleEntry({ entry, consoleWidth }: ConsoleEntryProps) { return (
!entry.error && setIsExpanded(!isExpanded)} + onClick={() => + !entry.error && !entry.warning && setIsExpanded(!isExpanded) + } >
- {!entry.error && ( + {!entry.error && !entry.warning && (
@@ -100,6 +107,18 @@ export function ConsoleEntry({ entry, consoleWidth }: ConsoleEntryProps) {
)} + + {entry.warning && ( +
+ +
+
Warning
+
+                  {entry.warning}
+                
+
+
+ )}
diff --git a/stores/console/types.ts b/stores/console/types.ts index 761d0af44f..3e0cba7ab1 100644 --- a/stores/console/types.ts +++ b/stores/console/types.ts @@ -2,6 +2,7 @@ export interface ConsoleEntry { id: string output: any error?: string + warning?: string durationMs: number startedAt: string endedAt: string