v0.9.0: Storage paths registry, per-app HDD_PATH resolution, storage management UI
- Fix backup toggles not appearing (read each app's own HDD_PATH from app.yaml) - Storage paths registry in settings.json with auto-discovery from deployed apps - Settings page "Adattárolók" section with disk usage, add/remove/default/schedulable - Deploy page path field as dropdown of registered storage paths - Health check storage monitoring (mount point, disk usage alerts) - Mount-point validation utilities (Linux syscall + cross-platform stubs) - Controller docker-compose mount changed to /mnt:/mnt:rw for multi-storage Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -94,6 +94,14 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
s.settingsNotificationsHandler(w, r)
|
||||
case path == "/settings/notifications/test" && r.Method == http.MethodPost:
|
||||
s.settingsNotificationsTestHandler(w, r)
|
||||
case path == "/settings/storage/add" && r.Method == http.MethodPost:
|
||||
s.settingsStorageAddHandler(w, r)
|
||||
case path == "/settings/storage/remove" && r.Method == http.MethodPost:
|
||||
s.settingsStorageRemoveHandler(w, r)
|
||||
case path == "/settings/storage/default" && r.Method == http.MethodPost:
|
||||
s.settingsStorageDefaultHandler(w, r)
|
||||
case path == "/settings/storage/schedulable" && r.Method == http.MethodPost:
|
||||
s.settingsStorageSchedulableHandler(w, r)
|
||||
case path == "/settings/app-backup" && r.Method == http.MethodPost:
|
||||
s.settingsAppBackupHandler(w, r)
|
||||
case path == "/backup/restore" && r.Method == http.MethodPost:
|
||||
@@ -122,6 +130,14 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
}
|
||||
|
||||
// primaryHDDPath returns the first registered storage path, or the legacy config value.
|
||||
func (s *Server) primaryHDDPath() string {
|
||||
if paths := s.settings.GetStoragePaths(); len(paths) > 0 {
|
||||
return paths[0].Path
|
||||
}
|
||||
return s.cfg.Paths.HDDPath
|
||||
}
|
||||
|
||||
func (s *Server) render(w http.ResponseWriter, name string, data interface{}) {
|
||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
if err := s.tmpl.ExecuteTemplate(w, name, data); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user