{% extends "base.html" %} {% from "_macros.html" import crumbs, page_header, status_badge, empty_state %} {% block title %}Maintenance Windows — Steward{% endblock %} {% block breadcrumb %}{{ crumbs([("Alerts", "/alerts/"), ("Maintenance", "")]) }}{% endblock %} {% block content %} {% call page_header("Maintenance windows", "During an active window, alerts in its scope still change state and show on the Alerts page, but send no notifications and run no Ansible actions. Each event a window mutes says so in the alert's history. An alert that is still firing when the window ends notifies then, and runs its action.") %} New window {% endcall %} {% if windows %}
{% for w in windows %} {% set is_active = w.start_at <= now and w.end_at >= now %} {% set is_upcoming = w.start_at > now %} {% endfor %}
Name Scope Start End Status
{{ w.name }} {% if w.scope_source is none %} All alerts {% elif w.scope_resource is none %} {{ w.scope_source }}/* {% else %} {{ w.scope_source }}/{{ w.scope_resource }} {% endif %} {{ w.start_at.strftime("%Y-%m-%d %H:%M") }} UTC {{ w.end_at.strftime("%Y-%m-%d %H:%M") }} UTC {% if is_active %}{{ status_badge('warn', 'Active') }} {% elif is_upcoming %}{{ status_badge('pending', 'Upcoming') }} {% else %}{{ status_badge('inactive', 'Expired') }}{% endif %}
{{ csrf_field() }}
{% else %}
{{ empty_state("No maintenance windows yet.", "New window", "/alerts/maintenance/new") }}
{% endif %} {% endblock %}