{% 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 %} {% macro window_table(rows, kind) %}
| 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 kind == 'active' %}{{ status_badge('warn', 'Active') }} ends {{ w.end_at|ago }}
{% elif kind == 'upcoming' %}{{ status_badge('pending', 'Upcoming') }}starts {{ w.start_at|ago }}
{% else %}{{ status_badge('inactive', 'Expired') }}ended {{ w.end_at|ago }} {% endif %}
|