AIS fixes + daily

This commit is contained in:
2026-06-27 13:38:52 -04:00
parent bea55ac448
commit c5477d05ad
13 changed files with 251 additions and 259 deletions

View File

@@ -36,8 +36,8 @@ function toPath(pts: number[]) {
}
async function poll() {
d.value = await api.current('magnitude');
history.value.push(d.value.magnitude ?? 0);
d.value = await api.current('seismic_magnitude');
history.value.push(d.value.seismic_magnitude ?? 0);
if(history.value.length > MAX_PTS) history.value.shift();
}
@@ -58,7 +58,7 @@ svg { width: 100%; height: 60px; overflow: visible; }
</div>
</div>
<template v-else>
<MetricRow label="Magnitude" :value="d.magnitude?.toFixed(1)" metric-key="magnitude" :data="d" />
<MetricRow label="Magnitude" :value="d.seismic_magnitude?.toFixed(1)" metric-key="seismic_magnitude" :data="d" />
<svg :viewBox="`0 0 ${W} ${H}`" preserveAspectRatio="none">
<line :x1="0" :y1="H/2" :x2="W" :y2="H/2" stroke="var(--border)" stroke-width="1" />
<path :d="toPath(history)" fill="none" stroke="var(--accent)" stroke-width="1.5" />