From 3676526daf1e964299cf46dbcd80f37fe7460233 Mon Sep 17 00:00:00 2001 From: Gmer4Lfe Date: Mon, 17 Aug 2026 05:11:00 -0400 Subject: [PATCH] Remove the Docker tab and stop overwriting folder.view3's file, which destroyed folders made in its own UI --- Plugin/unraid/Varaverk.page | 4 +- Plugin/unraid/api/docker.php | 89 ----- Plugin/unraid/include/confform.php | 7 +- Plugin/unraid/include/docker.php | 21 +- Plugin/unraid/pages/docker.php | 585 ----------------------------- 5 files changed, 20 insertions(+), 686 deletions(-) delete mode 100644 Plugin/unraid/api/docker.php delete mode 100644 Plugin/unraid/pages/docker.php diff --git a/Plugin/unraid/Varaverk.page b/Plugin/unraid/Varaverk.page index 5b45373..12f7578 100644 --- a/Plugin/unraid/Varaverk.page +++ b/Plugin/unraid/Varaverk.page @@ -210,7 +210,7 @@ unset($_master, $_h1m, $_host1_blank, $_my_hostid, $_conf_missing); // Determine active tab $tab = $_GET['tab'] ?? 'monitor'; -$validTabs = ['monitor', 'scheduler', 'docker', 'watchdog', 'partnership', 'fallback', 'arrs', 'rsync', 'auth', 'settings']; +$validTabs = ['monitor', 'scheduler', 'watchdog', 'partnership', 'fallback', 'arrs', 'rsync', 'auth', 'settings']; // The AI tab exists only on HOST1, and only while AI_ENABLED is true. Appended to $validTabs // rather than filtered out of it, so the check below rejects ?tab=ai server-side as well — @@ -228,7 +228,7 @@ $_vv_ai = vv_ai_owner_ui_on(); if ($_vv_ai) $validTabs[] = 'ai'; if (!in_array($tab, $validTabs)) $tab = 'monitor'; -$tabLabels = ['monitor' => 'Monitor', 'scheduler' => 'Scheduler', 'docker' => 'Docker', 'watchdog' => 'Watchdog', 'partnership' => 'Partnership', 'fallback' => 'FallBack', 'arrs' => 'Media Stack', 'rsync' => 'Rsync', 'auth' => 'Auth Stack', 'settings' => 'Settings', 'ai' => 'AI']; +$tabLabels = ['monitor' => 'Monitor', 'scheduler' => 'Scheduler', 'watchdog' => 'Watchdog', 'partnership' => 'Partnership', 'fallback' => 'FallBack', 'arrs' => 'Media Stack', 'rsync' => 'Rsync', 'auth' => 'Auth Stack', 'settings' => 'Settings', 'ai' => 'AI']; // Cache stamp for the stylesheet and script below. Both are served straight off the plugin // directory at a path that never changes, so a browser holding an old copy keeps using it after diff --git a/Plugin/unraid/api/docker.php b/Plugin/unraid/api/docker.php deleted file mode 100644 index d8cd252..0000000 --- a/Plugin/unraid/api/docker.php +++ /dev/null @@ -1,89 +0,0 @@ - false, 'error' => 'GET or POST only']); - exit; -} - -$action = trim($_POST['action'] ?? ''); -$container = trim($_POST['container'] ?? ''); -$folderId = trim($_POST['folder_id'] ?? ''); -$name = trim($_POST['name'] ?? ''); - -$result = match ($action) { - 'move_container' => vv_dk_move_container($container, $folderId), - 'create_folder' => vv_dk_create_folder($name), - 'rename_folder' => vv_dk_rename_folder($folderId, $name), - 'delete_folder' => vv_dk_delete_folder($folderId), - 'sync_conf_to_json'=> vv_dk_sync_conf_to_json(), - 'sync_json_to_conf'=> vv_dk_sync_json_to_conf(), - default => ['ok' => false, 'error' => 'Unknown action: ' . $action], -}; - -echo json_encode($result); diff --git a/Plugin/unraid/include/confform.php b/Plugin/unraid/include/confform.php index 5242f4a..8ff8650 100644 --- a/Plugin/unraid/include/confform.php +++ b/Plugin/unraid/include/confform.php @@ -122,8 +122,11 @@ const VV_UI_SECTION_SURFACES = [ // to go for a setting named after the page you are already looking at. ['match' => 'arr|sonarr|radarr|lidarr|media|play state|emby|jellyfin|plex', 'tab' => 'Media Stack', 'route' => 'Media Stack tab → Media settings'], - ['match' => 'docker', 'tab' => 'Docker', - 'route' => 'Docker tab → Docker settings'], + // No 'docker' route: the Docker tab was removed. Its one job was folder grouping, which + // folder.view3 does better, and Varaverk's copy overwrote folder.view3's docker.json + // wholesale on every write — so a folder created in that plugin's own UI was destroyed by + // the next Varaverk save. Docker settings fall through to the Settings catch-all rather + // than routing to a tab that no longer exists. // NPM, lldap and Authelia are the three services the Auth tab drives, and Certificate Monitor // is what its Certs panel reports. The credentials in particular belong on the page that fails // without them: a blank NPM_USER surfaces there as a refused login, and the fix is two panels diff --git a/Plugin/unraid/include/docker.php b/Plugin/unraid/include/docker.php index 1235d83..96362ad 100644 --- a/Plugin/unraid/include/docker.php +++ b/Plugin/unraid/include/docker.php @@ -8,7 +8,7 @@ // DESIGN PRINCIPLES // Varaverk owns its own folder store. // docker_folders.json is the primary record and has no external dependency. The -// folder.view3 plugin is synced to only when it is actually installed, so Varaverk's +// folder.view3 owns its own docker.json; Varaverk reads it and never writes it, so // grouping survives that plugin being absent, removed, or reset. // // The conf map is the interface to the scripts. @@ -42,7 +42,7 @@ // // CONFIGURATION // VV_DOCKER_JSON /boot/config/plugins/varaverk/docker_folders.json — primary -// VV_FV3_JSON folder.view3's docker.json — synced only if present +// VV_FV3_JSON folder.view3's docker.json — READ only, imported once at bootstrap // HOST*_DOCKER_FOLDER_MAP conf mirror consumed by the onboarding scripts // ═══════════════════════════════════════════════════════════════════════════════════════════════ // Docker tab — folder management and container inventory @@ -76,12 +76,17 @@ function vv_dk_write_json(array $data): bool { if (file_put_contents($tmp, json_encode($data, JSON_UNESCAPED_SLASHES)) === false) return false; if (!rename($tmp, $path)) return false; - // Mirror to folder.view3 if installed — keeps both in sync for users who want both UIs - if (file_exists(dirname(VV_FV3_JSON))) { - $t = VV_FV3_JSON . '.vv.tmp'; - @file_put_contents($t, json_encode($data, JSON_UNESCAPED_SLASHES)); - @rename($t, VV_FV3_JSON); - } + // Deliberately does NOT write folder.view3's docker.json any more. + // + // This used to mirror the whole file across — a wholesale overwrite, not a merge — so any + // folder created in folder.view3's own UI was destroyed by the next Varaverk save. Two + // writers, one file, and the one that clobbers wins. The evidence was a duplicated + // "Jayred365-Fallback" on HOST1: one folder with folder.view3's 20-char id, another with a + // 12-char id, the same name, different contents. + // + // folder.view3 is now the single owner of that file. Varaverk still *reads* it (see + // vv_dk_read_json's bootstrap import) so the Monitor widget can group containers, but read + // is the whole relationship. return true; } diff --git a/Plugin/unraid/pages/docker.php b/Plugin/unraid/pages/docker.php deleted file mode 100644 index 28373a3..0000000 --- a/Plugin/unraid/pages/docker.php +++ /dev/null @@ -1,585 +0,0 @@ - - - -
- Docker - - - - - -
- -
- -
-
Loading…
-
- - - - - -