diff --git a/CHANGELOG.md b/CHANGELOG.md index ba9fd42..d0d84aa 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,29 @@ Version numbers follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html --- +## [0.7.3] — 2026-10-27 + +### Changed + +- **Containers moved into Settings.** The top-nav Containers tab is gone; the + settings rail now has an "All containers" entry (the tile grid at `/containers`) + plus one entry per container (`/containers/`). Both views render inside + the same rail layout, and the Settings tab stays highlighted while you browse them. +- **Per-channel priority reference.** The shared priority block is replaced by one + reference per platform: Gotify (0 silent · 1–3 low · 4–7 normal · 8–10 high) and + Pushover (-2 Lowest · -1 Low · 0 Normal · 1 High · 2 Emergency), with the + Inspector → Pushover mapping noted under the Pushover one. +- **restart_on redesign.** The pill row is replaced by a grid of toggleable cards, + each with a color accent and a plain-language description of the status, plus + "Recommended" (UNHEALTHY + NOT RUNNING) and "Observe only" quick buttons. + +### Fixed + +- Unchecking every `restart_on` status now saves `restart_on: []` (observe only). + Previously an all-unchecked submit silently kept the old list. + +--- + ## [0.7.2] — 2026-10-27 ### Added diff --git a/src/inspector/__init__.py b/src/inspector/__init__.py index bc8c296..4910b9e 100755 --- a/src/inspector/__init__.py +++ b/src/inspector/__init__.py @@ -1 +1 @@ -__version__ = "0.7.2" +__version__ = "0.7.3" diff --git a/src/inspector/dashboard.py b/src/inspector/dashboard.py index 4cc8ffc..ac049cb 100755 --- a/src/inspector/dashboard.py +++ b/src/inspector/dashboard.py @@ -714,6 +714,60 @@ a.signout:hover { color: var(--ink); border-color: var(--muted); } } .color-row input[type=text] { flex: 1; } +/* restart_on grid */ +.restart-on-head { + display: flex; align-items: center; justify-content: space-between; + margin: 0.4rem 0 0.5rem; +} +.restart-on-head label { + font-size: 0.76rem; color: #94a3b8; font-weight: 600; +} +.restart-on-head .quick { + display: flex; gap: 0.4rem; +} +.restart-on-head .quick button { + background: transparent; color: var(--blue); border: 1px solid var(--border); + padding: 0.25rem 0.55rem; border-radius: 6px; font-size: 0.72rem; + cursor: pointer; font-family: inherit; font-weight: 600; +} +.restart-on-head .quick button:hover { background: var(--blue-bg); border-color: var(--blue); } +.restart-on-grid { + display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); + gap: 0.5rem; margin-bottom: 0.5rem; +} +.rcard { + position: relative; display: block; + padding: 0.65rem 0.75rem; + background: var(--bg); border: 1px solid var(--border); + border-radius: 10px; cursor: pointer; user-select: none; + transition: border-color 0.1s, background 0.1s; +} +.rcard:hover { border-color: var(--border-2, #273449); } +.rcard input { position: absolute; opacity: 0; pointer-events: none; } +.rcard.on { border-color: var(--rc-col); background: color-mix(in srgb, var(--rc-col) 10%, var(--bg)); } +.rcard .rc-head { + display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.25rem; +} +.rcard .rc-dot { + width: 8px; height: 8px; border-radius: 50%; background: var(--rc-col); + flex-shrink: 0; +} +.rcard .rc-name { + font-size: 0.82rem; font-weight: 700; color: var(--ink); + font-family: ui-monospace, SFMono-Regular, Menlo, monospace; +} +.rcard .rc-check { + margin-left: auto; width: 16px; height: 16px; border-radius: 4px; + border: 1.5px solid var(--border-2, #273449); background: transparent; + display: flex; align-items: center; justify-content: center; + color: transparent; font-weight: 900; font-size: 0.75rem; +} +.rcard.on .rc-check { + background: var(--rc-col); border-color: var(--rc-col); color: #06111f; +} +.rcard.on .rc-check::after { content: "✓"; } +.rcard .rc-desc { font-size: 0.72rem; color: var(--muted); line-height: 1.3; } + /* Danger button for delete container */ .btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid var(--red); @@ -728,8 +782,8 @@ def _page_head(refresh: bool, active: str) -> str: refresh_meta = '\n' if refresh else "" status_class = "active" if active == "status" else "" events_class = "active" if active == "events" else "" - containers_class = "active" if active == "containers" else "" - settings_class = "active" if active == "settings" else "" + # Settings tab stays active while browsing containers — they live under settings now. + settings_class = "active" if active in ("settings", "containers") else "" meta_text = f"v{__version__}" return ( "\n" @@ -759,7 +813,6 @@ def _page_head(refresh: bool, active: str) -> str: '
\n' f' Status\n' f' Events\n' - f' Containers\n' f' Settings\n' "
\n" f'
{meta_text}Sign out
\n' @@ -1195,7 +1248,7 @@ def _apply_settings_update(config_ref: ConfigRef, section: str, form: dict) -> N cfg["max_restarts_per_hour"] = _form_int(form, "max_restarts_per_hour", 3) cfg["color"] = _form_str(form, "color", "") restart_on = form.get("restart_on", []) - if restart_on: + if restart_on or form.get("restart_on_present"): cfg["restart_on"] = [s.upper() for s in restart_on] containers[name] = cfg raw["containers"] = containers @@ -1242,7 +1295,7 @@ def _apply_container_create(config_ref: ConfigRef, form: dict) -> str: "color": _form_str(form, "color", ""), } restart_on = form.get("restart_on", []) - if restart_on: + if restart_on or form.get("restart_on_present"): cfg["restart_on"] = [s.upper() for s in restart_on] containers[name] = cfg raw["containers"] = containers @@ -1458,7 +1511,10 @@ _SETTINGS_SECTIONS = [ _SETTINGS_SECTION_SLUGS = {slug for slug, *_ in _SETTINGS_SECTIONS} -def _render_settings_rail(app: AppConfig, active_slug: str, active_container: str = "") -> str: +def _render_settings_rail( + app: AppConfig, active_slug: str, active_container: str = "", + *, containers_tab_active: bool = False, +) -> str: parts: list[str] = ['