feat: live status chip on NRL list cards
Add a compact live-status chip to each NRL card in the location list, so the inline list next to the map (Overview tab) and the Sound > NRLs tab show live state alongside the new live tiles. Both surfaces share location_list.html, so this lands in both. - Chip shows "● <Leq> dB" when measuring (tinted green/amber/red at the same 55/70 thresholds as the live tiles), else Stopped / Offline / Wedged. Hidden for cards with no assigned unit and for vibration locations. - Painted by the existing 15s Overview poller (no extra requests). Repaints on htmx:afterSwap so the chips survive the NRL list reloading (e.g. the 30s dashboard swap). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -78,8 +78,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Right column: small assign/unassign pill + 3-dot menu -->
|
||||
<!-- Right column: live status chip + small assign/unassign pill + 3-dot menu -->
|
||||
<div class="flex items-center gap-2 shrink-0">
|
||||
<!-- Live status chip — painted by the Overview live poller
|
||||
(paintInlineLive) keyed on data-loc-live. Hidden until
|
||||
there's live data for this location. -->
|
||||
<span class="nrl-live-chip hidden" data-loc-live="{{ item.location.id }}"></span>
|
||||
{% if not item.assignment %}
|
||||
<!-- Primary action: visible because the unassigned card
|
||||
is most likely getting clicked on right after creation -->
|
||||
|
||||
Reference in New Issue
Block a user