From 82efeff40bdfb34e6d1eaa3b0c9fb465afbec00b Mon Sep 17 00:00:00 2001 From: Reimar Date: Tue, 1 Apr 2025 12:50:19 +0200 Subject: [PATCH] Limit table to 50 rows --- frontend/scripts/home.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/scripts/home.js b/frontend/scripts/home.js index b91ee24..074f1d1 100644 --- a/frontend/scripts/home.js +++ b/frontend/scripts/home.js @@ -42,6 +42,9 @@ function buildTable(data) { data.sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime()); + // TODO allow showing more than 50 by e.g. clicking + data = data.slice(0, 50); + data.forEach((log) => { var averageTemp = (log.tempHigh + log.tempLow) / 2.0; var color;