succd: Fix javascript and template syntax errors

Turns out the go templating engine fails silently when unclosed strings
are present in the templated file.........

Fix javascript code :))
This commit is contained in:
Rahix 2024-09-28 00:05:18 +02:00
parent 908727608a
commit 85d2afbdd0

View file

@ -290,15 +290,13 @@ window.addEventListener("load", (_) => {
const data = JSON.parse(event.data);
volts.innerHTML = data.Volts;
mbar.innerHTML = data.Mbar;
failsafe.innerHTML = data.failsafe ? "ON" : "OFF";
if data.failsafe {
failsafe.innerHTML = "ON"";
failsafe.innerHTML = data.Failsafe ? "ON" : "OFF";
if (data.Failsafe) {
failsafe.style = "background-color: #f06060";
} else {
failsafe.innerHTML = "OFF";
failsafe.style = "background-color: #60f060";
}
if data.highpressure {
if (data.HighPressure) {
highpressure.innerHTML = "ON";
highpressure.style = "background-color: #f06060";
} else {