1 Commits

Author SHA1 Message Date
Sebastian Seedorf
5c72559e8e fix: remove misleading (NP) suffix from Red column header 2026-06-05 13:01:15 +02:00
2 changed files with 8 additions and 6 deletions

View File

@@ -42,7 +42,7 @@ export default function TableViz({ config, rows, onEdit, onDelete }: Props) {
<th className="text-right px-2 py-1 text-green-400">Green</th> <th className="text-right px-2 py-1 text-green-400">Green</th>
)} )}
{config.signal_type !== 'green' && ( {config.signal_type !== 'green' && (
<th className="text-right px-2 py-1 text-red-400">Red (NP)</th> <th className="text-right px-2 py-1 text-red-400">Red</th>
)} )}
</tr> </tr>
</thead> </thead>

View File

@@ -24,13 +24,15 @@ export default function UpsChart({ config, upsRows, timeMode, onEdit, onDelete }
(el, w, h, lRef) => { (el, w, h, lRef) => {
if (upsRows.length < 2) return null; if (upsRows.length < 2) return null;
const data = timeMode === 'tick' const sorted = [...upsRows].sort((a, b) =>
? [...upsRows].sort((a, b) => a.game_tick - b.game_tick) timeMode === 'tick'
: upsRows; ? a.game_tick - b.game_tick
const xs = data.map((r) => : new Date(a.real_time).getTime() - new Date(b.real_time).getTime(),
);
const xs = sorted.map((r) =>
timeMode === 'tick' ? r.game_tick : new Date(r.real_time).getTime() / 1000, timeMode === 'tick' ? r.game_tick : new Date(r.real_time).getTime() / 1000,
); );
const ys = data.map((r) => r.ups); const ys = sorted.map((r) => r.ups);
const xAxis: uPlot.Axis = { const xAxis: uPlot.Axis = {
...AXIS_BASE, ...AXIS_BASE,