{{ f.description }}
{% endif %} +diff --git a/hbd/server/templates/settings.html b/hbd/server/templates/settings.html index adf7104..f1c4344 100644 --- a/hbd/server/templates/settings.html +++ b/hbd/server/templates/settings.html @@ -265,6 +265,93 @@ .mini-table .crit { color: #b71c1c; font-weight: 600; } .mini-table .dim { color: #aaa; } .mini-table .metric-path { font-family: monospace; font-size: 0.88em; } + + /* ---- Editable inputs ---- */ + .field-input { + width: 100%; + max-width: 360px; + border: 1px solid #ccc; + border-radius: 4px; + padding: 4px 8px; + font-size: 0.88em; + box-sizing: border-box; + font-family: inherit; + } + .field-input:focus { border-color: #0066cc; outline: none; box-shadow: 0 0 0 2px rgba(0,102,204,.15); } + + /* ---- Section footer (Stage Changes button) ---- */ + .section-footer { + padding: 10px 20px; + border-top: 1px solid #f0f0f0; + display: flex; + justify-content: flex-end; + } + + /* ---- Pending changes banner ---- */ + .pending-banner { + position: sticky; + top: 8px; + z-index: 100; + background: #fffbe6; + border: 1px solid #e8c840; + border-radius: 6px; + padding: 10px 16px; + display: flex; + align-items: center; + justify-content: space-between; + font-size: 0.87em; + margin-bottom: 16px; + box-shadow: 0 2px 8px rgba(0,0,0,.08); + } + .pending-banner .pending-msg { color: #7a6000; } + .pending-banner .pending-actions { display: flex; gap: 8px; } + + /* ---- YAML editor ---- */ + .yaml-editor { + width: 100%; + font-family: monospace; + font-size: 0.83em; + border: 1px solid #ccc; + border-radius: 4px; + padding: 8px; + box-sizing: border-box; + background: #fafafa; + resize: vertical; + min-height: 140px; + } + .yaml-editor:focus { border-color: #0066cc; outline: none; } + + /* ---- Button styles ---- */ + .btn { border: none; border-radius: 4px; padding: 5px 12px; font-size: 0.85em; cursor: pointer; } + .btn-primary { background: #0066cc; color: #fff; } + .btn-primary:hover { background: #0055aa; } + .btn-success { background: #2a7a2a; color: #fff; } + .btn-success:hover { background: #226622; } + .btn-secondary { background: #888; color: #fff; } + .btn-secondary:hover { background: #666; } + .btn-danger { background: transparent; color: #c62828; border: 1px solid #e0e0e0; border-radius: 4px; padding: 2px 7px; font-size: 0.82em; cursor: pointer; } + .btn-danger:hover { background: #fce4ec; } + + /* ---- CRUD table for users / oauth ---- */ + .crud-table { width: 100%; border-collapse: collapse; font-size: 0.83em; } + .crud-table th { background: #f5f5f5; padding: 6px 10px; text-align: left; font-weight: 600; color: #555; font-size: .78em; text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid #e0e0e0; } + .crud-table td { padding: 6px 10px; border-bottom: 1px solid #f0f0f0; vertical-align: top; } + .crud-table tbody tr:last-child td { border-bottom: none; } + .crud-table .field-input { max-width: none; } + + /* ---- Rollback modal ---- */ + .modal-overlay { + position: fixed; inset: 0; background: rgba(0,0,0,.4); + display: flex; align-items: center; justify-content: center; z-index: 1000; + } + .modal-box { + background: #fff; border-radius: 8px; padding: 24px; + min-width: 340px; max-width: 520px; width: 90%; + box-shadow: 0 8px 32px rgba(0,0,0,.18); + } + .modal-box h3 { margin: 0 0 12px; font-size: 1em; } + .backup-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #f0f0f0; font-size: .87em; } + .backup-row:last-child { border-bottom: none; }
@@ -272,7 +359,27 @@Current server configuration — read from the config file at startup.
+Edit server configuration — changes are staged until you publish them to .hb.yaml.
{{ section.description }}
{% endif %}{{ f.description }}
{% endif %} +| Username | Display name | Avatar URL | +Admin | Channels | New password | + |
|---|---|---|---|---|---|---|
| {{ u.username | e }} | ++ | + | + | + {% for ch in all_channel_names %} + + {% endfor %} + | ++ | + |
| Name (slug) | Type | URL | Client ID | +Client Secret | Label | Logo URL | + |
|---|---|---|---|---|---|---|---|
| {{ p.name | e }} | ++ + | ++ | + | + | + | + | + |
{{ f.description }}
{% endif %} + {% elif f.sensitive %}{{ f.description }}
{% endif %}| Username | -Full Name | -Role | -Avatar | -Channels | -
|---|---|---|---|---|
| {{ u.username }} | -{{ u.full_name or '—' }} | -- {% if u.admin %} - Admin - {% else %} - User - {% endif %} - | -- {% if u.avatar %}{{ u.avatar }}{% else %}—{% endif %} - | -- {% if u.notification_channels %} - - {% for ch in u.notification_channels %} - {{ ch }} - {% endfor %} - - {% else %}—{% endif %} - | -
| Metric | -Op | -Warning | -Critical | -Hysteresis | -Count | -
|---|---|---|---|---|---|
| {{ m.metric }} | -{{ m.operator or '>' }} | -{{ m.warning if m.warning is not none else '—' }} | -{{ m.critical if m.critical is not none else '—' }} | -{{ '%.0f%%' % (m.hysteresis * 100) if m.hysteresis else '—' }} | -{{ m.count }} | -
| Host | -Watch | -DynDNS | -Owner | -Threshold config | -Channels | -
|---|---|---|---|---|---|
| {{ h.name }} | -- ● - | -- ● - | -{{ h.owner or '—' }} | -{{ h.threshold_config or '—' }} | -- {% if h.notification_channels %} - - {% for ch in h.notification_channels %} - {{ ch }} - {% endfor %} - - {% else %}—{% endif %} - | -