Commit Graph
32 Commits
Author SHA1 Message Date
Gmer4Lfe a5936331c9 auth stack page, monitor cache fix, symlink install 2026-06-05 19:20:28 -04:00
Gmer4Lfe c1919febc2 Monitor: fix memory bar ZFS field name zfs_kb → arc_kb 2026-06-04 21:40:07 -04:00
Gmer4Lfe 6aaf04e25b Monitor: 1-second CPU/mem/net updates via fast endpoint
Split slow cached monitor endpoint from the live stats. monitor_fast.php
reads /proc/stat, /proc/meminfo, ZFS arcstats, and /proc/net/dev directly
— no cache wrapper, 87ms response. Docker/vm/swap pulled from last full
cache so mem card stays complete. Full monitor poll stays at 2s for
everything else (GPU, containers, storage, etc).
2026-06-04 16:29:45 -04:00
Gmer4Lfe de6fcc3997 Add Rsync page, upgrade monitor rsync card, partnership overhaul, API key periodic check, docker watchdog manual-stop detection 2026-06-03 15:58:50 -04:00
Gmer4Lfe 3e71c314d7 Add Rsync card to monitor page Row 3 (before GPU)
New span-1 card shows global RSYNC_ENABLED gate, per-window badges (C/D/I/W),
active profile names + elapsed time from lock files, and last-sync timestamp
per orchestrator window from script log files.

GPU shrunk from span 2 to span 1 to make room. Row 3 is now:
Rsync(1) | GPU(1) | Transcode(2) | Streams(4)
2026-06-01 21:10:44 -04:00
Gmer4LfeandClaude Sonnet 4.6 63b1f0a76c feat: cumulative pulled/pushed GB totals in pools and array card headers
disk_io now returns {tr, tw} cumulative GB alongside {r, w} rates.
A centered span in each card h3 shows ↓total ↑total (since last boot),
updating each poll. Helpers updated for the new object format.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 22:40:56 -04:00
Gmer4LfeandClaude Sonnet 4.6 e9b9d1b5da ui: pools card — live summary header matching array card style
Shows N/total ok · X% used · max Y° · ↓read ↑write in the Pools
card title, using SSD thresholds for temp coloring.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 22:37:30 -04:00
Gmer4LfeandClaude Sonnet 4.6 a8c5b2af29 ui: array card — 2 columns at ≤1024px, 3+ at full width
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 22:35:06 -04:00
Gmer4LfeandClaude Sonnet 4.6 212b61ce15 feat: live disk I/O rates on array and pools cards
Adds vv_disk_io_rates() — snapshots /proc/diskstats each poll and
computes per-device MB/s. Exposed as disk_io in the monitor API.

JS:
- Per-disk rows: ↓read ↑write inline next to disk name (green/amber, hidden when idle)
- Pool rows: aggregate pool I/O next to pool name
- Array header: total array I/O in the subtitle line

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 22:31:19 -04:00
Gmer4LfeandClaude Sonnet 4.6 3e9c7b4921 ui: streams header — left/right groups span full card width
Server badges + media type anchor to the left; device/res/codec anchor
to the right via justify-content:space-between. Right group still
disappears at ≤1024px (now a single display:none on .vv-stream-right).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 22:23:14 -04:00
Gmer4LfeandClaude Sonnet 4.6 3e89997ab5 ui: transcode sessions — all items in 2-col layout, hidden scroll beyond 2 rows
Removes the 4-item cap and +N more label. All sessions go into balanced
columns; the container max-height clips to 2 rows with a hidden scrollbar.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 22:18:49 -04:00
Gmer4LfeandClaude Sonnet 4.6 67e274fd4e ui: transcode active sessions — static 2×2 balanced grid, no scroll
Splits up to 4 sessions into two balanced columns (ceil/floor split),
separated by a subtle divider. A '+N more' line appears beyond 4.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 22:16:46 -04:00
Gmer4LfeandClaude Sonnet 4.6 55e817d234 ui: show last cleanup freed amounts on transcode Ramdisk/NVMe tags
Parses the last 'Ramdisk freed' and 'SSD freed' values from the transcode
management log and displays them as small ↓XMB annotations inside each tag.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 22:15:13 -04:00
Gmer4LfeandClaude Sonnet 4.6 3b645b2108 ui: transcode active sessions — 2-row visible window, scroll on 3rd+
Reduced max-height from 57px to 44px (2 × 22px rows) so the container
cleanly shows two entries at a time and scrolls when a third appears.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 22:11:01 -04:00
Gmer4LfeandClaude Sonnet 4.6 279e6be282 ui: hide device/resolution/codec chip groups at ≤1024px
Wraps each group (separator + chips) in a display:contents span so it
flows naturally at full width and collapses cleanly at the 1024px breakpoint,
leaving server badges and media type visible at intermediate sizes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 22:06:21 -04:00
Gmer4LfeandClaude Sonnet 4.6 52cc6b4721 ui: add media type chip group to streams header (Movies/Shows/Music/Live)
Purple-accented chips, ordered Movies → Shows → Music → Live, with
per-index shade variation matching the other chip groups.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 22:02:59 -04:00
Gmer4LfeandClaude Sonnet 4.6 f0f136f28a fix: hide scrollbars on all nested scrollable divs in monitor cards
Global webkit rule now covers all descendants, not just direct children.
Inline scrollbar-width:none added to the three inner overflow-y:auto divs
(transcode sessions, GPU processes, scripts list) so Firefox hides them too.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 22:00:50 -04:00
Gmer4LfeandClaude Sonnet 4.6 0319b13304 ui: color-coded chip groups in streams header with per-chip shade variation
Device chips: blue, resolution chips: teal, codec chips: amber.
Alternating bg shades within each group to visually separate chips.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 21:59:16 -04:00
Gmer4LfeandClaude Sonnet 4.6 89df1a98db ui: show resolution and codec counts in streams header
Adds height/codec fields to both Emby/Jellyfin and Plex session data,
then surfaces them as chip groups (· 2 4K  3 1080p · 4 H.264  2 HEVC)
in the streams card header alongside the existing device type bar.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 21:52:31 -04:00
Gmer4LfeandClaude Sonnet 4.6 bea7b6b045 ui: show active device type counts in streams header
Parses each session's client string (e.g. "Emby for Roku / Bedroom TV")
into a device category using priority-ordered regex matching:
Android TV, Fire TV, Apple TV, Android, iOS, Roku, LG, Samsung,
Google TV, Kodi, Browser, Desktop.

Counts are grouped and sorted by frequency, displayed as compact chips
to the right of the server badges:
  Emby 7  Jellyfin 2  ·  3 Android  2 Roku  1 Fire TV  1 iOS

Unknown client strings are silently skipped (not shown as "Other").

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 21:41:14 -04:00
Gmer4LfeandClaude Sonnet 4.6 fb0530deba Consolidate all paths to plugin flash dir, fix watchdog 7.3 triggers
- Move SCRIPTS_DIR/DATA_DIR/STATE_DIR from appdata to /boot/config/plugins/varaverk
- All state files now in STATE_DIR (no more /tmp or /boot/config root writes)
- Bootstrap: Gitea-first clone with GitHub fallback, no array dependency
- varaverk.cfg seeded with Gitea connection settings
- .gitignore: add State_Files/, varaverk.cfg, varaverk-*.txz
- Partnership/transcode/fallback scripts use STATE_DIR variables
- PHP config.php: DATA_DIR/STATE_DIR constants, VV_SETUP_STATE_FILE dynamic
- deploy.sh PROD_ROOT updated to plugin flash dir

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 13:30:20 -04:00
Gmer4Lfe 4aaa3c507a Monitor partner card: onboard phase badges (re-add) 2026-05-30 20:08:23 -04:00
Gmer4Lfe 192664605b Revert monitor onboard indicator — belongs on Partnership page only 2026-05-30 20:06:11 -04:00
Gmer4Lfe c97a30b9c4 Monitor partner card: onboard phase indicator per remote host
vv_partner_state() now reads setup.db and adds onboard_phase (0/1/2/null)
to each host entry.

Partner card JS renders a badge under the hostname for remote hosts that
haven't completed Phase 2: amber "Awaiting onboard" (phase 1) or grey
"Not provisioned" (phase 0). Phase 2 complete shows nothing extra.
2026-05-30 20:04:32 -04:00
Gmer4Lfe a5755921ab Two-phase onboard + partner card enhancements
partnership_onboard.sh:
- --phase1-only (OWNER): SSH key exchange + conf push only; safe to run
  before HOST2 has Varaverk installed; writes HOST2_PHASE1_DONE to setup.db
- --phase2-only (OWNER): skips SSH, runs Steps 2-9 (containers, arr stack,
  onboard, arr sync, conf push); writes HOST2_PHASE2_DONE to setup.db
- Mirror path: after SSH setup, SSHes OWNER and fires --phase2-only in
  background (nohup); reads OWNER's SCRIPTS_DIR from varaverk.cfg first;
  falls back to manual instruction if SSH fails

partnership.php (include): vv_pt_nodes() reads setup.db and exposes
onboard_phase (0/1/2) per remote node

partnership.php (page): phase-aware Actions section per partner host;
node cards show phase badge (not provisioned / awaiting onboard / done);
Phase 1 and Phase 2 buttons call run.php with extra_args

monitor.php: partner card logo (top-right), CPU thread count, RAM total GB,
unRAID version row in remote stats grid
2026-05-30 18:12:49 -04:00
Gmer4Lfe 3dd867c684 Fix fallback state key: FAILOVER → FALLBACK (was never matching) 2026-05-30 17:26:09 -04:00
Gmer4Lfe 1e9d8bc75b Fallback card: rich state display with tiers, strikes, disabled/suspended
include/monitor.php: vv_fallback_state() now returns:
  enabled, check_interval, handback_strikes, handback_strikes_required,
  partnership_suspended, partner_lost_at, partnership_required,
  partnership_suspend_after — all read from state file + conf vars.

pages/monitor.php: fallback card render rebuilt:
  Disabled: clear message with how to enable
  Suspended: partnership inactive with elapsed time
  FAILOVER: outage duration + T1/T2/T3/T4 tier badges (active=green,
    pending=dark) + handback strike progress dots (●●○) when remote
    comes back and strikes are counting
  NO_INTERNET/DARK: short contextual line
  NORMAL: quiet "monitoring · 30s · partnership gated" meta line
  Accent border: disabled/suspended → warn, NORMAL → ok, FAILOVER → err
2026-05-30 17:24:55 -04:00
Gmer4Lfe d56b02e410 Monitor: card icons + status accent borders
varaverk.css:
  .vv-ico — icon wrapper (inline-flex, opacity 0.38, flex-shrink:0)
  .vv-accent-ok/warn/err — left border colour overrides for state cards
  Smooth 0.5s transition on border-left-color for all monitor cards

monitor.php:
  All 14 card headers now have inline SVG icons:
    System (existing server), Power (existing bolt), CPU (chip+pins),
    Memory (RAM stick), Network (switch tree), Scripts (terminal),
    Fallback (shield), Partner (two servers linked), Containers (layers),
    GPU (PCIe card), Transcode (film→encode→strip), Streams (play ▶),
    Watchdog (eye), Parity (✓ circle), Pools (cylinder), Array (drive stack)

  Status accent borders applied by JS after each render:
    Fallback — ok:NORMAL, err:FAILOVER, warn:NO_INTERNET/DARK
    Partner  — ok:any remote online, warn:all offline
    Watchdog — ok:healthy, err:reboots/OOM/daemon, warn:other issues
    Array    — ok:STARTED, err:any other state
2026-05-30 17:08:59 -04:00
Gmer4Lfe 7e01f6d3db Differentiate API key missing vs API unreachable in monitor banner
unraid_api.php: track key_missing separately from general fallbacks.
  vv_api_data() sets key_missing=true when HOST*_UNRAID_API_KEY is empty.
  vv_api_get_status() includes key_missing in the status payload.

monitor.php: two distinct banner states instead of one orange warning.
  key_missing → subtle dark/grey note: "API key not configured — add
    HOST1_UNRAID_API_KEY in Scheduler → host conf to enable enhanced monitoring"
  key present but unreachable → existing orange ⚠ with fallback list.
  No banner at all when API is working correctly.
2026-05-30 16:26:51 -04:00
Gmer4Lfe 0121462576 Graceful degradation before partnership/SSH is set up
Fix 1 — Monitor partner card (common.php + monitor.php):
  vv_remote_hosts_stats() no longer skips hosts with no API key.
  Returns no_api_key:true entry instead. Monitor JS renders
  "API key not configured — complete Onboard to enable" instead
  of a blank space.

Fix 2 — rawconf push not alarming pre-onboard (config.php + scheduler.php):
  Probe failures (Tailscale not found, plugin not installed) now carry
  ready:false. JS treats ready:false results silently — button shows
  "✓ Saved" not "push failed: HOST2" before SSH is set up.
  Only genuine post-onboard failures (ready not false) show as errors.

Fix 3 — Partnership Onboard button (partnership.php):
  Disabled with tooltip when no partner hostname is in master.conf.
  When partner configured but not onboarded, adds explanation note:
  "Onboard will generate your SSH key, exchange it with the partner..."
  No partner configured: "Edit master.conf and set HOST2."
2026-05-30 16:01:44 -04:00
Gmer4Lfe 86048b32d3 Plugin: common.php library, watchdog expansion, monitor + scheduler improvements
PHP architecture:
- Extract common.php from monitor.php — shared system functions (vv_system_info,
  vv_memory_breakdown, vv_remote_hosts_stats, disk/GPU/UPS/network/docker/parity, etc.)
  now live in one place; monitor.php and watchdog.php both require common.php
- Add unraid_api.php as explicit include (was implicit via config.php chain)
- confform.php: add missing require_once config.php (implicit dep made explicit)
- Delete orphaned pages/docs.php and pages/config.php (absorbed into scheduler)

Watchdog page:
- Add Storage watchdog card (growth + log strikes, baseline age, suppress ceilings)
- Add Network watchdog card (NPM strikes, DDNS domain/container, NPM URL)
- One host per row layout — all 5 watchdog cards equally spaced via inner grid
- Watchdog now uses Unraid API for local system stats; remote nodes with API key
  but no SSH get system info from vv_remote_hosts_stats() with api_only flag
- SSH bundle: /proc/meminfo passed as raw section instead of awk-parsed header
  fields — fixes RAM showing 0 on remote hosts where awk quoting was unreliable
- vv_wd_local_system() rewritten as thin wrapper over vv_system_info() + vv_memory_breakdown()

Monitor page:
- Watchdog card: add stability strikes, storage watchdog strikes, network NPM status,
  live system stats (rootfs/log/tmp %, RAM free, load, CPU temp, zombies, NIC, sshd)
- Row height: switch from max-height on cards to minmax(0, calc(...)) on grid track —
  all cards in a row now fill to the tallest card's height correctly (fixes Pools card
  being shorter than neighbours)

Scheduler page:
- Add Tools section above Custom Scripts — lists Tools/*.sh with run/dry-run/cron/log
- vv_tools_scripts() function in scheduler.php include

Tools:
- Add docker_prune_images.sh — removes dangling Docker images; --dry-run and --status modes
2026-05-29 23:33:52 -04:00
Gmer4Lfe fb051b60c1 Varaverk: FallBack + Watchdog tabs; plugin path restructure to Plugin/unraid/
- FallBack tab: per-node tier inventory + active fallback card with duration, tier, handback strikes, running container status
- Watchdog tab: live system health (RAM bar + thresholds, load, uptime, daemon), docker watchdog strikes + skip list + restart history, stability strikes + reboot log, resource pressure alert card, config inventory (mem limits, required, pause/stop lists)
- Swapped partnership/arrs tab order; FallBack between partnership and watchdog
- Plugin source tree moved from Plugin/usr/local/emhttp/plugins/varaverk/ to Plugin/unraid/
- Deployment/ conf templates added
2026-05-28 22:24:50 -04:00