fix: correct all-time hours value and update backend limit

This commit is contained in:
2026-08-09 17:12:22 +07:00
parent 6f2a8a0d8f
commit abfac1d3bb
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -21,8 +21,8 @@ class PostgresHistory:
end: datetime.datetime,
limit: int = 2000,
) -> List[Dict]:
if not 1 <= limit <= 5000:
raise ValueError("limit must be between 1 and 5000")
if not 1 <= limit <= 10000:
raise ValueError("limit must be between 1 and 10000")
if start >= end:
raise ValueError("start must be before end")
+1 -1
View File
@@ -195,7 +195,7 @@
<section class="map-card" id="history-card" style="margin-top:14px;padding:20px">
<div style="display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap">
<div><h2 id="history-title" style="margin:0;font-size:1rem">PostgreSQL history</h2><p id="history-status" class="subtitle">Select a RID flow station to load the last 7 days</p></div>
<select id="history-range" style="padding:9px 12px;border:1px solid var(--border);border-radius:10px;background:white"><option value="24">24 hours</option><option value="168" selected>7 days</option><option value="720">30 days</option><option value="2160">90 days</option></select>
<select id="history-range" style="padding:9px 12px;border:1px solid var(--border);border-radius:10px;background:white"><option value="24">24 hours</option><option value="168" selected>7 days</option><option value="720">30 days</option><option value="2160">90 days</option><option value="876000">All time</option></select>
</div>
<div style="height:260px;margin-top:14px"><canvas id="history-chart" aria-label="Historical water level and discharge chart"></canvas></div>
</section>