hourly endpoint fix?

This commit is contained in:
2026-06-26 00:54:29 -04:00
parent 06be7c0b4f
commit 5947b61b8f
3 changed files with 9 additions and 8 deletions

View File

@@ -70,6 +70,7 @@ export async function queryHourly(start, end) {
from(bucket: "${c.INFLUX_BUCKET}")
|> range(start: ${start.toISOString()}, stop: ${end.toISOString()})
|> filter(fn: (r) => ${MEASUREMENTS.map(m => `r._measurement == "${m}"`).join(' or ')})
|> group(columns: ["_field"])
|> aggregateWindow(every: 1h, fn: mean, createEmpty: false)
|> pivot(rowKey: ["_time"], columnKey: ["_field"], valueColumn: "_value")
`;