v0.25.0 — Debug page: operator testing & diagnostics dashboard
Debug-mode-only dashboard (/debug) with 8 collapsible sections: system diagnostics, notification testing, backup triggers, storage simulation, hub & connectivity, self-update dry-run, DR/setup wizard, and in-memory log viewer. Migrates debug dump from API router to web server. Adds ring buffer log capture, storage disconnect simulation, event history tracking, and cross-drive/self-update test methods. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,9 +12,21 @@ import (
|
||||
)
|
||||
|
||||
// NeedsSetup checks whether the controller should enter setup mode.
|
||||
// Setup is needed when no customer ID has been configured (empty string).
|
||||
// Setup is needed when no customer ID has been configured (empty string)
|
||||
// or when a debug-triggered setup marker file exists.
|
||||
func NeedsSetup(cfg *config.Config) bool {
|
||||
return cfg.Customer.ID == ""
|
||||
if cfg.Customer.ID == "" {
|
||||
return true
|
||||
}
|
||||
if _, err := os.Stat(filepath.Join(cfg.Paths.DataDir, ".needs-setup")); err == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// ClearSetupMarker removes the debug-triggered setup marker file.
|
||||
func ClearSetupMarker(dataDir string) {
|
||||
os.Remove(filepath.Join(dataDir, ".needs-setup"))
|
||||
}
|
||||
|
||||
// SetupState persists wizard progress to survive browser crashes.
|
||||
|
||||
Reference in New Issue
Block a user