88091936c5
The page-top chrome was inconsistent: most nested views used the breadcrumb
kicker + page-title pattern, but plugin sub-pages used ad-hoc "← back" links,
~11 pages stacked a breadcrumb AND a redundant ancestor back button, and two
(monitors/edit, hosts/uptime) had a back button but no breadcrumb. The
settings/plugin_detail page stacked all of it at once.
Unify on the breadcrumb-led model:
- settings/_tabs.html: drop the hardcoded "Settings" h1; the breadcrumb
("Settings › …") plus the tab strip is the header.
- settings/plugin_detail: drop the "← Plugins" back button.
- docker container_detail/swarm/disk + snmp/device: replace ad-hoc back links
with the standard crumbs() breadcrumb.
- host_agent, ansible/*, alerts/maintenance: remove redundant ancestor back
buttons (the breadcrumb's parent crumbs already link there); keep lateral
shortcuts (Inventory/Schedules/Browse/Targets/Groups/New).
- monitors/edit, hosts/uptime: add the missing breadcrumb, drop the back link.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016Jg27rgypiW2efULXJDtMC
78 lines
2.8 KiB
HTML
78 lines
2.8 KiB
HTML
{% extends "base.html" %}
|
|
{% from "_macros.html" import crumbs %}
|
|
{% block title %}Maintenance Windows — Steward{% endblock %}
|
|
{% block breadcrumb %}{{ crumbs([("Alerts", "/alerts/"), ("Maintenance", "")]) }}{% endblock %}
|
|
{% block content %}
|
|
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem;">
|
|
<h1 class="page-title" style="margin-bottom:0;">Maintenance Windows</h1>
|
|
<div style="display:flex;gap:0.5rem;">
|
|
<a class="btn" href="/alerts/maintenance/new">New Window</a>
|
|
</div>
|
|
</div>
|
|
|
|
<p style="color:var(--text-muted);font-size:0.88rem;margin-bottom:1.5rem;">
|
|
During an active window, alert rule evaluation is suppressed for the matching scope.
|
|
Metrics are still recorded — only notifications are silenced.
|
|
</p>
|
|
|
|
{% if windows %}
|
|
<div class="card-flush">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Scope</th>
|
|
<th>Start</th>
|
|
<th>End</th>
|
|
<th style="text-align:center;">Status</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for w in windows %}
|
|
{% set is_active = w.start_at <= now and w.end_at >= now %}
|
|
{% set is_upcoming = w.start_at > now %}
|
|
<tr>
|
|
<td style="font-weight:500;">{{ w.name }}</td>
|
|
<td style="font-size:0.85rem;color:var(--text-muted);">
|
|
{% if w.scope_source is none %}
|
|
<span title="All alert rules">All alerts</span>
|
|
{% elif w.scope_resource is none %}
|
|
<span>{{ w.scope_source }}/*</span>
|
|
{% else %}
|
|
<span>{{ w.scope_source }}/{{ w.scope_resource }}</span>
|
|
{% endif %}
|
|
</td>
|
|
<td style="font-size:0.85rem;font-family:ui-monospace,monospace;">
|
|
{{ w.start_at.strftime("%Y-%m-%d %H:%M") }} UTC
|
|
</td>
|
|
<td style="font-size:0.85rem;font-family:ui-monospace,monospace;">
|
|
{{ w.end_at.strftime("%Y-%m-%d %H:%M") }} UTC
|
|
</td>
|
|
<td style="text-align:center;">
|
|
{% if is_active %}
|
|
<span class="badge badge-yellow">active</span>
|
|
{% elif is_upcoming %}
|
|
<span class="badge badge-dim">upcoming</span>
|
|
{% else %}
|
|
<span style="color:var(--text-dim);font-size:0.8rem;">expired</span>
|
|
{% endif %}
|
|
</td>
|
|
<td class="td-actions">
|
|
<form method="post" action="/alerts/maintenance/{{ w.id }}/delete" style="display:inline;">
|
|
<button type="submit" class="btn btn-sm btn-danger"
|
|
onclick="return confirm('Delete window "{{ w.name }}"?')">Delete</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% else %}
|
|
<div class="card" style="text-align:center;padding:3rem;">
|
|
<p style="color:var(--text-muted);">No maintenance windows configured.</p>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|