<div class="list-group">
  {% if not buses %}
    <span>No buses configured.</span>
  {% endif %}
  {% for id, bus in buses.items() %}
    <a
      href="{{ url_for('device.show_bus', id=id) }}"
      class="list-group-item list-group-item-action d-flex justify-content-between align-items-center"
    >
      <div>
        <strong>{{ id }}</strong>
        <small class="text-muted">{{ bus.type }}</small>
      </div>

      <div>
        {% if online_status[id] %}
          <span class="badge bg-success">Online</span>
        {% else %}
          <span class="badge bg-danger">Offline</span>
        {% endif %}
      </div>
    </a>
  {% endfor %}
</div>
