{% extends "tesm_core/base.html" %}
{% from "tesm_core/macros.html" import search_box %}

{% block page_title %}Statusuebersicht{% endblock %}
{% block page_sub %}
  {{ counts.total }} Geraete &middot; Pruefintervall {{ interval }} s
  {% if not detailed %}&middot; oeffentliche Ansicht{% endif %}
{% endblock %}

{% block topbar_extra %}
  {{ search_box('tile-sections', 'Geraet suchen ...') }}
  {% if current_user.has('settings_system.execute') %}
    <form method="post" action="{{ url_for('settings.run_check_now') }}" data-no-guard>
      <input type="hidden" name="{{ csrf_field_name }}" value="{{ csrf_token() }}">
      <button class="btn btn--sm" type="submit" title="Sofort pruefen">
        {{ icon('refresh', size=15) }} Jetzt pruefen
      </button>
    </form>
  {% endif %}
{% endblock %}

{% block content %}
<div id="dashboard-tiles" data-refresh-url="{{ url_for('dashboard.tiles') }}"
     data-refresh-interval="20000">
  {% include "tesm/_dashboard_tiles.html" %}
</div>
{% endblock %}
