more documentation and last 24h chart

This commit is contained in:
2026-01-28 08:42:20 +11:00
parent 2127a44872
commit 940af3680f
3 changed files with 75 additions and 27 deletions

View File

@@ -109,6 +109,13 @@ function computeRange(range, tz) {
axisEnd = end;
break;
}
case "24h-last": {
end = now;
start = new Date(now.getTime() - 24 * 60 * 60 * 1000);
axisStart = start;
axisEnd = end;
break;
}
case "72h": {
end = startOfDay(now, tz);
start = new Date(end.getTime() - 72 * 60 * 60 * 1000);
@@ -249,16 +256,6 @@ function renderDashboard(data) {
updateText("live-supercap", "--");
}
const forecastUrl = document.getElementById("forecast-url");
if (forecastUrl) {
if (data.open_meteo_url) {
forecastUrl.href = data.open_meteo_url;
forecastUrl.textContent = data.open_meteo_url;
} else {
forecastUrl.textContent = "--";
}
}
const obs = data.observations || [];
const forecastAll = (data.forecast && data.forecast.points) || [];