From 496ff9afc80196a637a83b79f3e1844aaa56d9be Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 4 Apr 2024 11:36:21 +0200 Subject: [PATCH] Completely match the new Supervisor log timestamp format (#110) With the recent change which added milliseconds to the timestamp the timestamp removal regex used in the landing page frontend did not completely remove the timestamp anymore. This also lead to log level not match correctly, and hence loss of log coloring. Correctly match the log timestamp. See also: https://github.com/home-assistant/supervisor/pull/4954 --- rootfs/usr/share/www/static/scripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootfs/usr/share/www/static/scripts.js b/rootfs/usr/share/www/static/scripts.js index 07a17ab..c79edc0 100644 --- a/rootfs/usr/share/www/static/scripts.js +++ b/rootfs/usr/share/www/static/scripts.js @@ -87,7 +87,7 @@ function fetchLogs() { } var scrolledDown = logElement.scrollTop + logElement.clientHeight === logElement.scrollHeight; logElement.innerHTML = text - .replace(/^[\[\d \-:\]]*/gm, "") + .replace(/^[\[\d \-:.\]]*/gm, "") .replace(/^(INFO|WARNING|ERROR)\s\(\w+\)\s(.*)\n/gm, "$2\n") if (scrolledDown) { // Scroll content down if it was already scrolled down