move dashboard script block content into own files with new classes to update, render to have a better code overview
Build and Push Docker Container / build-and-push (push) Successful in 3m55s

This commit is contained in:
2026-04-07 03:25:10 +02:00
parent 03968fecdf
commit 739c0520f9
11 changed files with 1261 additions and 1269 deletions
+25
View File
@@ -0,0 +1,25 @@
class Utils {
static safeString(value) {
if (value === null || value === undefined || value === "") return "-";
return String(value);
}
static toTitle(value) {
if (String(value || "").toLowerCase() === "finished") return "Done";
return String(value || "").replace(/_/g, " ").replace(/\b\w/g, (ch) => ch.toUpperCase());
}
static formatObservedAtLocal(value) {
if (value === null || value === undefined || value === "") return "-";
const raw = String(value).trim();
const parsed = new Date(raw);
if (Number.isNaN(parsed.getTime())) {
return Utils.safeString(raw).slice(11, 19);
}
return parsed.toLocaleTimeString([], {
hour: "2-digit",
minute: "2-digit",
second: "2-digit",
});
}
}