Files
terra-view/backend/routers
serversdown d297412d8a feat(locations): show event count on vibration cards instead of sessions
For vibration projects, "Sessions: 0" on every location card was
misleading — monitoring sessions don't exist under the watcher-forward
pipeline.  The relevant number is how many SFM events have been
attributed to the location.

get_project_locations now fans out events_for_location() concurrently
across all vibration locations in the project (via asyncio.gather) and
injects event_count into each item's payload.  Sound locations are
unchanged — they still show session_count.

The template already had the conditional rendering ready from the
previous commit:

    {% if item.event_count is defined and item.location.location_type == 'vibration' %}
        <span><strong>{{ event_count }}</strong> events</span>
    {% else %}
        <span>Sessions: {{ session_count }}</span>
    {% endif %}

so this commit is purely the data-layer change that activates it.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 05:25:19 +00:00
..
2025-12-02 06:36:13 +00:00
2025-12-15 18:46:26 +00:00