From 59d1150cb7d4be1aefd5b1f1131fdc64f963d04f Mon Sep 17 00:00:00 2001 From: "Philipp.Stahlberg" <131917964+PhilippStahlbergGit@users.noreply.github.com> Date: Sat, 13 Jun 2026 10:26:56 +0200 Subject: [PATCH 1/4] feat: add simple error to showcase in ui --- docs/index.html | 2 ++ docs/script.js | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/index.html b/docs/index.html index 7cdcea7..d9a1547 100644 --- a/docs/index.html +++ b/docs/index.html @@ -20,5 +20,7 @@

Result:

+ +
No errors yet..
\ No newline at end of file diff --git a/docs/script.js b/docs/script.js index 2b92f49..a7297e5 100644 --- a/docs/script.js +++ b/docs/script.js @@ -129,17 +129,28 @@ async function fetchFile() { timeoutId = setTimeout(() => { const parsedNewFile = YAML.parse(newContent); + + try{ validatorFunc( pyoDide.toPy(parsedLockFile), pyoDide.toPy(parsedNewFile), context ); - console.log("Success!") - + console.log("Success!"); + errors.innerText = "Sucess!"; + } catch(err){ + console.log('Error: ' + err.message); + errors.innerText = 'Error: ' + err.message; + } + + + + }, sleep_time); }; } catch (err) { output.innerText = 'Error: ' + err.message; + } } From a85873e1a1bcab136e97b597d80e62cd894941fe Mon Sep 17 00:00:00 2001 From: "Philipp.Stahlberg" <131917964+PhilippStahlbergGit@users.noreply.github.com> Date: Sat, 13 Jun 2026 10:41:58 +0200 Subject: [PATCH 2/4] chore: make error message cleaner --- docs/script.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/script.js b/docs/script.js index a7297e5..8707040 100644 --- a/docs/script.js +++ b/docs/script.js @@ -140,11 +140,18 @@ async function fetchFile() { errors.innerText = "Sucess!"; } catch(err){ console.log('Error: ' + err.message); - errors.innerText = 'Error: ' + err.message; + const errorStartIndex = err.message.indexOf("ValidationError:"); + + if (errorStartIndex !== -1) { + const cleanMessage = err.message.substring(errorStartIndex).trim(); + + errors.innerText = cleanMessage; + //showNotificationBanner(cleanMessage); + + }else{ + console.log('Error: ' + err.message); } - - - + } }, sleep_time); }; From e55db4865c166ed2015b16d0f97dcefd2f742dee Mon Sep 17 00:00:00 2001 From: "Philipp.Stahlberg" <131917964+PhilippStahlbergGit@users.noreply.github.com> Date: Sat, 13 Jun 2026 14:47:20 +0200 Subject: [PATCH 3/4] chore: add tailwind and do some basic configurations for frontpage --- docs/index.html | 63 +++++++++++++++++++++++++++++++++++++------------ docs/script.js | 4 ---- docs/styles.css | 28 ---------------------- 3 files changed, 48 insertions(+), 47 deletions(-) delete mode 100644 docs/styles.css diff --git a/docs/index.html b/docs/index.html index d9a1547..3c1526e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,24 +3,57 @@ ConfigLock Web Portal - + - -

ConfigLock Web Portal

- - - - - -
+ -

Result:

-
No data yet...
- - +
+ +
+

ConfigLock Web Portal

+
- +
+
+ + + + + + + +
+ +
+ +
+
+
+ +
+ +
+

Result:

+
No data yet...
+
+ +
+

Errors / Status:

+
No errors yet..
+
+ +
-
No errors yet..
+
+ + + \ No newline at end of file diff --git a/docs/script.js b/docs/script.js index 8707040..c5c83b2 100644 --- a/docs/script.js +++ b/docs/script.js @@ -112,10 +112,6 @@ async function fetchFile() { const [pyodide, lockFileContents, pythonCode] = await fetchContents(lockFilePath, validatorFilePath); - - - - output.innerText = lockFileContents; output.contentEditable = 'true'; diff --git a/docs/styles.css b/docs/styles.css deleted file mode 100644 index 4363dff..0000000 --- a/docs/styles.css +++ /dev/null @@ -1,28 +0,0 @@ -body { - font-family: sans-serif; - max-width: 600px; - margin: 40px auto; - line-height: 1.6; -} - -input, -button { - display: block; - width: 100%; - margin-bottom: 10px; - padding: 10px; - box-sizing: border-box; -} - -#output { - background: #f4f4f4; - padding: 10px; - white-space: pre-wrap; - border: 1px solid #ccc; -} - -#url { - margin-bottom: 10px; - color: #666; - white-space: pre-wrap; -} From 8538099871b924764cd85a5d6b23428e3cb72c5e Mon Sep 17 00:00:00 2001 From: "Philipp.Stahlberg" <131917964+PhilippStahlbergGit@users.noreply.github.com> Date: Sat, 13 Jun 2026 16:30:33 +0200 Subject: [PATCH 4/4] fix: adjust error code to be right way for now --- docs/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/script.js b/docs/script.js index c5c83b2..42c460f 100644 --- a/docs/script.js +++ b/docs/script.js @@ -128,8 +128,8 @@ async function fetchFile() { try{ validatorFunc( - pyoDide.toPy(parsedLockFile), pyoDide.toPy(parsedNewFile), + pyoDide.toPy(parsedLockFile), context ); console.log("Success!");