Remove the Docker tab and stop overwriting folder.view3's file, which destroyed folders made in its own UI
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user