From f21e17c1d37949dafe42c8b2ac2572067cb2890a Mon Sep 17 00:00:00 2001 From: Logan4413 Date: Tue, 29 Oct 2024 19:11:39 -0400 Subject: [PATCH 1/3] Logging values in debugging attempt --- src/components/ConfigEditor.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/ConfigEditor.tsx b/src/components/ConfigEditor.tsx index 3e119b1..8b09b86 100644 --- a/src/components/ConfigEditor.tsx +++ b/src/components/ConfigEditor.tsx @@ -28,6 +28,7 @@ export function ConfigEditor(props: ConfigEditorProps) { ], }); }, [monaco]); + console.log("Errors", errorCount); return (
From 8b1d39749fcf8dbc3be21889320f25712b73c5a7 Mon Sep 17 00:00:00 2001 From: Logan4413 Date: Tue, 29 Oct 2024 19:21:35 -0400 Subject: [PATCH 2/3] Fix editor save button --- src/components/ConfigEditor.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/ConfigEditor.tsx b/src/components/ConfigEditor.tsx index 8b09b86..796ba8f 100644 --- a/src/components/ConfigEditor.tsx +++ b/src/components/ConfigEditor.tsx @@ -38,7 +38,8 @@ export function ConfigEditor(props: ConfigEditorProps) { defaultValue={JSON.stringify(config, null, 2)} theme="vs-dark" onValidate={markers => { - setErrorCount(markers.length); + const severeErrors = markers.filter(m => m.severity > 4); + setErrorCount(severeErrors.length); }} onChange={value => value && setCurrentConfigText(value)} /> From 2f29a0b923282399ff419362546d49d925d02603 Mon Sep 17 00:00:00 2001 From: Logan4413 Date: Tue, 29 Oct 2024 19:24:13 -0400 Subject: [PATCH 3/3] Remove console.log line --- src/components/ConfigEditor.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/ConfigEditor.tsx b/src/components/ConfigEditor.tsx index 796ba8f..e9df124 100644 --- a/src/components/ConfigEditor.tsx +++ b/src/components/ConfigEditor.tsx @@ -28,7 +28,6 @@ export function ConfigEditor(props: ConfigEditorProps) { ], }); }, [monaco]); - console.log("Errors", errorCount); return (