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:
parent
908727608a
commit
85d2afbdd0
|
@ -290,15 +290,13 @@ window.addEventListener("load", (_) => {
|
||||||
const data = JSON.parse(event.data);
|
const data = JSON.parse(event.data);
|
||||||
volts.innerHTML = data.Volts;
|
volts.innerHTML = data.Volts;
|
||||||
mbar.innerHTML = data.Mbar;
|
mbar.innerHTML = data.Mbar;
|
||||||
failsafe.innerHTML = data.failsafe ? "ON" : "OFF";
|
failsafe.innerHTML = data.Failsafe ? "ON" : "OFF";
|
||||||
if data.failsafe {
|
if (data.Failsafe) {
|
||||||
failsafe.innerHTML = "ON"";
|
|
||||||
failsafe.style = "background-color: #f06060";
|
failsafe.style = "background-color: #f06060";
|
||||||
} else {
|
} else {
|
||||||
failsafe.innerHTML = "OFF";
|
|
||||||
failsafe.style = "background-color: #60f060";
|
failsafe.style = "background-color: #60f060";
|
||||||
}
|
}
|
||||||
if data.highpressure {
|
if (data.HighPressure) {
|
||||||
highpressure.innerHTML = "ON";
|
highpressure.innerHTML = "ON";
|
||||||
highpressure.style = "background-color: #f06060";
|
highpressure.style = "background-color: #f06060";
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue