#5095 "Share view on the shared stylesheet; breadcrumbs, focus-visible and wide tables". - dashboard/share_view.html loads theme.css and steward.css; its own copy of the old purple palette is gone. Only the read-only frame and the x/y/w/h grid stay inline, written in tokens. HEX_CEILING 75 -> 58. - Breadcrumbs on settings/general, settings/thresholds, the dashboard share page and share-link-created. tests/test_breadcrumbs.py fails on any page extending base.html without a crumbs() trail, unless it is on the named list of section top pages, logged-out and error pages (rule 134). - :focus-visible draws --fs-focus-ring on links, buttons, summaries, inputs and anything with tabindex. - Any card holding a .table scrolls sideways (card:has(table.table)), so a wide table no longer widens the page at phone width; .card-flush scrolls too, main gets min-width:0, and .table-wrap covers a table outside a card. - tests/test_share_view.py renders the share view: shared sheets, no hex colour, escaped name, widgets loading through the share token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
78 lines
4.0 KiB
HTML
78 lines
4.0 KiB
HTML
{# steward/templates/settings/general.html #}
|
|
{% extends "base.html" %}
|
|
{% from "_macros.html" import crumbs %}
|
|
{% block title %}Settings — General — Steward{% endblock %}
|
|
{% block breadcrumb %}{{ crumbs([("Settings", "/settings/"), ("General", "")]) }}{% endblock %}
|
|
{% block content %}
|
|
{% set active_tab = "general" %}
|
|
{% include "settings/_tabs.html" %}
|
|
|
|
<form method="post" action="/settings/general/">{{ csrf_field() }}
|
|
<div class="card" style="max-width:640px;">
|
|
<h2 class="section-title" style="margin-bottom:1.25rem;">General</h2>
|
|
|
|
<div class="form-group">
|
|
<label>Public base URL</label>
|
|
<input type="text" name="general.public_base_url"
|
|
value="{{ settings['general.public_base_url'] }}"
|
|
placeholder="https://monitor.example.com">
|
|
<div style="font-size:0.78rem;color:var(--text-muted);margin-top:0.25rem;">
|
|
External URL where this Steward instance is reachable from the outside.
|
|
Leave blank to use whatever hostname you're currently browsing via.
|
|
Used by install scripts, share links, and alert notifications.
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>Trusted reverse proxies</label>
|
|
<input type="number" name="general.trusted_proxy_hops" min="0" max="5"
|
|
value="{{ settings['general.trusted_proxy_hops'] }}" style="max-width:120px;">
|
|
<div style="font-size:0.78rem;color:var(--text-muted);margin-top:0.25rem;">
|
|
How many proxies sit in front of Steward (e.g. 1 for Traefik, 2 for Cloudflare in front of Traefik).
|
|
Steward believes their X-Forwarded-For and X-Forwarded-Proto headers up to that many hops: it marks
|
|
the login cookie Secure and sends HSTS only when they report HTTPS, and throttles logins by the address
|
|
they report. 0 trusts no proxy.
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>Session lifetime <span style="color:var(--text-muted);font-size:0.8rem;">(hours)</span></label>
|
|
<input type="number" name="session.lifetime_hours" min="1" max="720"
|
|
value="{{ settings['session.lifetime_hours'] }}" style="max-width:120px;">
|
|
<div style="font-size:0.78rem;color:var(--text-muted);margin-top:0.25rem;">A login lasts this long; then Steward asks for the password again.</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>Failed logins before a pause</label>
|
|
<div style="display:flex;gap:0.5rem;align-items:center;flex-wrap:wrap;">
|
|
<input type="number" name="login.max_failures" min="1" max="100"
|
|
value="{{ settings['login.max_failures'] }}" style="max-width:90px;">
|
|
<span style="font-size:0.85rem;color:var(--text-muted);">failures from one address pause its logins for</span>
|
|
<input type="number" name="login.lockout_minutes" min="1" max="1440"
|
|
value="{{ settings['login.lockout_minutes'] }}" style="max-width:90px;">
|
|
<span style="font-size:0.85rem;color:var(--text-muted);">minutes</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>Data retention <span style="color:var(--text-muted);font-size:0.8rem;">(days)</span></label>
|
|
<input type="number" name="data.retention_days" min="1"
|
|
value="{{ settings['data.retention_days'] }}" style="max-width:120px;">
|
|
<div style="font-size:0.78rem;color:var(--text-muted);margin-top:0.25rem;">Old ping/DNS results older than this are pruned by the cleanup job.</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>Monitor poll interval <span style="color:var(--text-muted);font-size:0.8rem;">(seconds)</span></label>
|
|
<input type="number" name="monitors.poll_interval_seconds" min="10"
|
|
value="{{ settings['monitors.poll_interval_seconds'] }}" style="max-width:120px;">
|
|
<div style="font-size:0.78rem;color:var(--text-muted);margin-top:0.25rem;">Requires restart to take effect.</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="margin-top:1rem;display:flex;align-items:center;gap:1rem;">
|
|
<button type="submit" class="btn">Save</button>
|
|
<span style="font-size:0.82rem;color:var(--text-muted);">Changes to session lifetime take effect immediately.</span>
|
|
</div>
|
|
</form>
|
|
{% endblock %}
|