{% extends "base.html" %}
{% block title %}Event Bus — Hassette{% endblock %}
{% block content %}
  <h1 class="ht-heading-4">
    <span class="ht-icon"><i class="fas fa-tower-broadcast"></i></span>
    <span>Event Bus</span>
  </h1>
  <!-- App filter -->
  <div class="ht-field-group ht-mb-4" hx-disinherit="hx-select">
    <div class="ht-control">
      <div class="ht-select ht-select--sm">
        <select id="bus-owner-filter"
                hx-get="/ui/partials/bus-listeners"
                hx-target="#bus-listeners"
                hx-swap="innerHTML"
                hx-include="#bus-owner-filter"
                name="owner">
          <option value="">All Apps</option>
          {% for owner in owners %}<option value="{{ owner }}">{{ owner }}</option>{% endfor %}
        </select>
      </div>
    </div>
  </div>
  <!-- Listeners table -->
  <div class="ht-card">
    <div id="bus-listeners" data-live-on-app="/ui/partials/bus-listeners">{% include "partials/bus_listeners.html" %}</div>
  </div>
{% endblock %}
