Files
FabledSteward/roundtable/templates/alerts/maintenance.html
T
bvandeusen 55a4fac3e9 copy: flip visible wordmark → Roundtable
Updates nav brand, page <title> blocks across all templates, and the
read-only share view footer. Removes duplicate Roundtable heading from
login card now that the nav wordmark reads correctly.
2026-04-13 18:40:30 -04:00

77 lines
2.7 KiB
HTML

{% extends "base.html" %}
{% block title %}Maintenance Windows — Roundtable{% 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 btn-ghost" href="/alerts/">← Alerts</a>
<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 &quot;{{ w.name }}&quot;?')">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 %}