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:
@@ -245,6 +245,47 @@ func (r *CrossDriveRunner) RunAllScheduled(ctx context.Context, schedule string)
|
||||
return nil
|
||||
}
|
||||
|
||||
// RunAllConfigured runs cross-drive backup for all enabled apps, ignoring schedule.
|
||||
// Used by the debug page to trigger all backups regardless of their configured schedule.
|
||||
func (r *CrossDriveRunner) RunAllConfigured(ctx context.Context) error {
|
||||
if r.debug {
|
||||
r.logger.Printf("[DEBUG] RunAllConfigured: starting for all enabled apps")
|
||||
}
|
||||
|
||||
r.AutoEnableSmallApps()
|
||||
r.syncInfraConfig(ctx)
|
||||
|
||||
configs := r.sett.GetAllCrossDriveConfigs()
|
||||
if len(configs) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
var errs []string
|
||||
var ran int
|
||||
for stackName, cfg := range configs {
|
||||
if !cfg.Enabled {
|
||||
continue
|
||||
}
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return ctx.Err()
|
||||
default:
|
||||
}
|
||||
ran++
|
||||
if err := r.RunAppBackup(ctx, stackName); err != nil {
|
||||
errs = append(errs, fmt.Sprintf("%s: %v", stackName, err))
|
||||
}
|
||||
}
|
||||
|
||||
if r.debug {
|
||||
r.logger.Printf("[DEBUG] RunAllConfigured: done — %d ran, %d errors", ran, len(errs))
|
||||
}
|
||||
if len(errs) > 0 {
|
||||
return fmt.Errorf("cross-drive errors: %s", strings.Join(errs, "; "))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// IsRunning returns true if the given app's backup is currently running.
|
||||
func (r *CrossDriveRunner) IsRunning(stackName string) bool {
|
||||
r.mu.Lock()
|
||||
|
||||
Reference in New Issue
Block a user