88ab5b917e
Renames the Python package directory, CLI command, env var prefix, docker-compose service/container/image, Postgres role/db, and all visible branding. Marketing form is "Fabled Steward". Clean break from the previous rebrand: drops the fabledscryer→roundtable import shim in __init__.py and the FABLEDSCRYER_* env var fallback in config.py and migrations/env.py. Env vars are now STEWARD_* only. Heads-up for existing deployments: - Postgres user/db renamed fabledscryer → steward in docker-compose.yml. Existing volumes need the role/db renamed inside Postgres, or override POSTGRES_USER/POSTGRES_DB to keep the old names. - Host-agent systemd unit is now steward-agent.service. Existing agents keep running under the old name; reinstall to switch. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
87 lines
3.5 KiB
HTML
87 lines
3.5 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}New Maintenance Window — Steward{% endblock %}
|
|
{% block content %}
|
|
<div style="max-width:560px;margin:2rem auto;">
|
|
<h1 class="page-title">New Maintenance Window</h1>
|
|
<div class="card">
|
|
<form method="post" action="/alerts/maintenance">
|
|
|
|
<div class="form-group">
|
|
<label>Window Name</label>
|
|
<input type="text" name="name" required autofocus
|
|
placeholder="e.g. Weekly reboot — homelab">
|
|
</div>
|
|
|
|
<div style="display:grid;grid-template-columns:1fr 1fr;gap:1rem;">
|
|
<div class="form-group">
|
|
<label>Start (UTC)</label>
|
|
<input type="datetime-local" name="start_at" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>End (UTC)</label>
|
|
<input type="datetime-local" name="end_at" required>
|
|
</div>
|
|
</div>
|
|
|
|
{# ── Scope ─────────────────────────────────────────────────────────────── #}
|
|
<div class="form-group">
|
|
<label>Scope</label>
|
|
<select name="_scope_type" id="scope-type" onchange="updateScope()">
|
|
<option value="all">All alerts</option>
|
|
<option value="source">By source module</option>
|
|
<option value="resource">By source + resource</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div id="scope-source-row" style="display:none;" class="form-group">
|
|
<label>Source Module</label>
|
|
<select name="scope_source" id="scope-source">
|
|
<option value="">— select —</option>
|
|
{% for src in source_modules %}
|
|
<option value="{{ src }}">{{ src }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<div id="scope-resource-row" style="display:none;" class="form-group">
|
|
<label>Resource Name</label>
|
|
<input type="text" name="scope_resource" id="scope-resource"
|
|
placeholder="Exact resource name (e.g. my-server)">
|
|
<p style="font-size:0.78rem;color:var(--text-muted);margin-top:0.25rem;">
|
|
Leave blank to suppress all resources within the selected source.
|
|
</p>
|
|
</div>
|
|
|
|
<div style="display:flex;gap:1rem;margin-top:1.5rem;">
|
|
<button type="submit" class="btn">Create Window</button>
|
|
<a href="/alerts/maintenance" class="btn btn-ghost">Cancel</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="card" style="margin-top:1rem;">
|
|
<div class="section-title" style="margin-bottom:0.5rem;">How scope works</div>
|
|
<div style="display:grid;gap:0.4rem;font-size:0.82rem;color:var(--text-muted);">
|
|
<div><strong style="color:var(--text);">All alerts</strong> — every alert rule is suppressed</div>
|
|
<div><strong style="color:var(--text);">By source</strong> — e.g. source=ping suppresses all ping alerts</div>
|
|
<div><strong style="color:var(--text);">By source + resource</strong> — e.g. ping/my-server suppresses only that host's ping alerts</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function updateScope() {
|
|
var t = document.getElementById('scope-type').value;
|
|
document.getElementById('scope-source-row').style.display = t === 'all' ? 'none' : '';
|
|
document.getElementById('scope-resource-row').style.display = t === 'resource' ? '' : 'none';
|
|
if (t === 'all') {
|
|
document.getElementById('scope-source').value = '';
|
|
document.getElementById('scope-resource').value = '';
|
|
}
|
|
if (t === 'source') {
|
|
document.getElementById('scope-resource').value = '';
|
|
}
|
|
}
|
|
</script>
|
|
{% endblock %}
|