feat: Implementación completa de Soft Delete para apps

- Agregados campos deleted, deleted_at, deleted_reason a MonitoredApp
- Implementado soft_delete_app() y restore_app() en ConfigManager
- Modificado get_apps() para filtrar apps eliminadas por defecto
- Agregados métodos get_all_apps() y get_deleted_apps()
- Actualizado unregister_app() para usar soft delete en lugar de hard delete
- Creados endpoints:
  * GET /api/apps/deleted - Ver historial de apps eliminadas
  * POST /api/apps/:name/restore - Restaurar app eliminada
- Agregada sección de Historial en index.html con UI completa
- Botón de restaurar para cada app eliminada
- El servicio systemd se elimina físicamente, solo el JSON mantiene historial
- Permite auditoría y recuperación de apps eliminadas accidentalmente
This commit is contained in:
2026-01-19 19:40:47 -05:00
parent 60f38be957
commit 13b36dda5f
6 changed files with 365 additions and 7 deletions

View File

@@ -257,6 +257,9 @@ pub fn sync_discovered_services(services: Vec<DiscoveredService>) {
mode: service.node_env,
service_file_path: service.service_file.clone(),
registered_at,
deleted: false,
deleted_at: None,
deleted_reason: None,
systemd_service: None,
created_at: None,
};