fix: health history all-down — connectivity checks and UI data path

Service manager fixes (connectivity tests):
- email_manager: replace telnet with socket.create_connection for SMTP/IMAP;
  replace nslookup with socket.getaddrinfo for DNS; exclude unconfigured domain
  from success (email healthy=False now correctly means ports refused, not missing domain)
- calendar_manager: replace localhost:5232 with cell-radicale:5232;
  fix database check to test dir writability instead of file existence (files created on demand)
- file_manager: replace localhost:8080 with cell-webdav:80; add top-level success key
- network_manager: replace nslookup with socket.getaddrinfo;
  add success key to dhcp_test and ntp_test return values
- routing_manager: exclude iptables_access from success
  (iptables runs in cell-wireguard, not API container)
- wireguard_manager: add success key to no-arg test_connectivity result

Health history UI:
- SvcCol reads data?.status?.running || data?.status?.status — handles nested health check shape

Result: network/wireguard/calendar/files/routing/vault all healthy=True.
Email healthy=False is correct — mail server needs ≥1 account before Dovecot starts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-21 02:18:23 -04:00
parent f848a1d056
commit a5381b2ebc
7 changed files with 68 additions and 117 deletions
+4 -2
View File
@@ -29,7 +29,7 @@ class FileManager(BaseServiceManager):
self.safe_makedirs(self.webdav_dir)
# WebDAV service URL
self.webdav_url = 'http://localhost:8080'
self.webdav_url = 'http://cell-webdav:80'
# Initialize WebDAV configuration
self._ensure_config_exists()
@@ -411,10 +411,12 @@ umask = 022
'message': str(e)
}
results['success'] = results.get('http', {}).get('success', False)
return results
except Exception as e:
return {
'success': False,
'http': {'success': False, 'message': str(e)},
'webdav': {'success': False, 'message': str(e)}
}