more documentation and last 24h chart
This commit is contained in:
@@ -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) || [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user