From eade6072b054d318c46553cd49a8e5530740bc79 Mon Sep 17 00:00:00 2001 From: Gmer4Lfe Date: Sun, 24 May 2026 22:47:34 -0400 Subject: [PATCH] Varaverk: Scheduler Information panel with structured how-it-works sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Right panel title: "Suggested Schedules" → "Scheduler Information" - Removed top hint paragraph; info now lives in the panel itself - Added three collapsible info sections (open by default) at top of panel: Controls — toggle, cron, run, dry run, log, stop, verbose, config Orchestrators — enabled/disabled behavior, child cron rules, event triggers Children & Advanced — toggle semantics, independent cron, rsync flag badge - Bullet lists use CSS columns:2 with column-fill:balance for even distribution - "Suggested Schedules" divider separates info from parsed schedule blocks - Added vvToggleSug() for DOM-traversal-based accordion (no ID dependency) --- .../emhttp/plugins/varaverk/css/varaverk.css | 10 +++ .../plugins/varaverk/pages/scheduler.php | 75 +++++++++++++++++-- 2 files changed, 79 insertions(+), 6 deletions(-) diff --git a/Plugin/usr/local/emhttp/plugins/varaverk/css/varaverk.css b/Plugin/usr/local/emhttp/plugins/varaverk/css/varaverk.css index f44ea70..d1d7dcd 100644 --- a/Plugin/usr/local/emhttp/plugins/varaverk/css/varaverk.css +++ b/Plugin/usr/local/emhttp/plugins/varaverk/css/varaverk.css @@ -195,6 +195,16 @@ font-size: 11px; white-space: nowrap; } .vv-sug-path { color: #888; font-family: monospace; } .vv-sug-configured { color: #4caf50; font-size: 11px; } +/* Info sections inside Scheduler Information panel */ +.vv-info-block .vv-sug-title { color: #9ab; } +.vv-info-body { padding: 2px 10px 10px; } +.vv-info-cols { margin: 0; padding-left: 16px; columns: 2; column-gap: 20px; column-fill: balance; } +.vv-info-cols li { font-size: 12px; color: #aaa; margin-bottom: 5px; break-inside: avoid; line-height: 1.5; } +.vv-info-cols li strong { color: #ccc; } +.vv-info-cols code { background: #1a1a1a; padding: 0 4px; border-radius: 2px; + font-size: 11px; color: #9ab; border: 1px solid #333; } +.vv-info-divider { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: #444; + padding: 10px 12px 4px; border-top: 1px solid #2a2a2a; margin-top: 2px; } /* Log panel */ .vv-log-panel { margin-top: 10px; border-top: 1px solid #333; padding-top: 8px; } diff --git a/Plugin/usr/local/emhttp/plugins/varaverk/pages/scheduler.php b/Plugin/usr/local/emhttp/plugins/varaverk/pages/scheduler.php index fde142d..dd79de3 100644 --- a/Plugin/usr/local/emhttp/plugins/varaverk/pages/scheduler.php +++ b/Plugin/usr/local/emhttp/plugins/varaverk/pages/scheduler.php @@ -15,10 +15,6 @@ foreach ($tree as $orch) { ?>
-

Toggle saves immediately. Fill in cron expressions and hit - Save Schedule at the bottom. Run fires now; - Dry Run sets DRY_RUN=1. Log opens on the right.

-
@@ -209,7 +205,7 @@ foreach ($tree as $orch) {
- Suggested Schedules + Scheduler Information
@@ -229,6 +225,65 @@ foreach ($tree as $orch) {
+ + +
+
+ + Controls +
+
+
    +
  • Toggle — saves to schedule.json immediately
  • +
  • Cron — 5-field expression; hit Save Schedule to apply all at once
  • +
  • Run — fires script immediately regardless of schedule
  • +
  • Dry Run — same as Run with DRY_RUN=1
  • +
  • Log — opens script log in this panel; auto-scrolls to latest
  • +
  • Stop — sends SIGTERM to process group → 3 s → SIGKILL; clears stuck locks
  • +
  • Verbose — appends --log for detailed per-step output
  • +
  • Config — edit host-scoped settings for scripts that support it
  • +
+
+
+ + +
+
+ + Orchestrators +
+
+
    +
  • Enabled (ON) — orchestrator is the sole trigger; its cron fires it and it calls all children in order
  • +
  • Disabled (OFF) — orchestrator never runs; all children switch off and crons are suppressed
  • +
  • Child toggles (orch ON) — comment or uncomment the script's line in master.conf *_SCRIPTS array
  • +
  • Child cron (orch ON) — ignored; orch is the only trigger while it is enabled
  • +
  • Child cron (orch OFF) — enable a child and give it a cron to run it on its own schedule, independent of the orch
  • +
  • ⚡ Array Start / Stop — triggered by Unraid array events; no cron field; toggle enables or disables the handler
  • +
+
+
+ + +
+
+ + Children & Advanced +
+
+
    +
  • Advanced ▸ — expand to see child scripts managed by the orchestrator
  • +
  • Toggle (orch ON) — comments or uncomments the script entry in master.conf; determines whether the orch calls it
  • +
  • Toggle (orch OFF) — has no effect without a cron; pair with a cron expression to run standalone
  • +
  • Cron (orch OFF) — child runs on its own schedule; completely independent of the parent orchestrator
  • +
  • Rsync child — shows amber TIER_RSYNC_ENABLED badge; toggle writes true / false directly to master.conf — controls whether rsync runs inside that orchestrator
  • +
  • Rsync (orch OFF) — toggle is disabled; rsync flag only matters when the orchestrator is running
  • +
+
+
+ +
Suggested Schedules
+ $block): $scripts = $block['scripts']; $schedule = $block['schedule']; @@ -467,7 +522,7 @@ function vvBackToSuggestions() { const _preBack = document.getElementById('vv-log-pre'); _preBack.removeEventListener('scroll', vvOnLogScroll); _preBack.style.overflowY = ''; - document.getElementById('vv-log-title').textContent = 'Suggested Schedules'; + document.getElementById('vv-log-title').textContent = 'Scheduler Information'; document.getElementById('vv-log-ts').textContent = ''; document.getElementById('vv-log-dot').style.display = 'none'; requestAnimationFrame(vvFitRight); @@ -976,6 +1031,14 @@ function vvToggleSugBlock(bi) { body.style.display = open ? 'none' : 'block'; chevron.textContent = open ? '▸' : '▾'; } + +function vvToggleSug(header) { + const body = header.nextElementSibling; + const chevron = header.querySelector('.vv-sug-chevron'); + const open = body.style.display !== 'none'; + body.style.display = open ? 'none' : ''; + chevron.textContent = open ? '▸' : '▾'; +}