feat: Docker diagnostic hints on disconnection
- Classify Docker errors into categories (socket_not_found, connection_refused, permission_denied, timeout, tls_error) with platform-specific hints - Enrich GET /api/health with structured diagnostics (category, hints, platform) - Expandable hints panel in sidebar when Docker is disconnected - "Retry now" button for immediate re-check - Collapsible raw error details for advanced users
This commit is contained in:
+3
-2
@@ -3,6 +3,7 @@ import type {
|
||||
ContainerStats,
|
||||
Deploy,
|
||||
DeployLog,
|
||||
DockerHealth,
|
||||
EventLogEntry,
|
||||
EventLogStats,
|
||||
InspectResult,
|
||||
@@ -267,8 +268,8 @@ export function listNpmCertificates(): Promise<NpmCertificate[]> {
|
||||
|
||||
// ── Health ──────────────────────────────────────────────────────────
|
||||
|
||||
export function getHealth(): Promise<{ docker: boolean }> {
|
||||
return get<{ docker: boolean }>('/api/health');
|
||||
export function getHealth(): Promise<{ docker: DockerHealth }> {
|
||||
return get<{ docker: DockerHealth }>('/api/health');
|
||||
}
|
||||
|
||||
// ── Auth ─────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
},
|
||||
"health": {
|
||||
"connected": "connected",
|
||||
"disconnected": "disconnected"
|
||||
"disconnected": "disconnected",
|
||||
"rawError": "Technical details",
|
||||
"retryNow": "Retry now"
|
||||
},
|
||||
"nav": {
|
||||
"dashboard": "Dashboard",
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
},
|
||||
"health": {
|
||||
"connected": "подключён",
|
||||
"disconnected": "отключён"
|
||||
"disconnected": "отключён",
|
||||
"rawError": "Технические детали",
|
||||
"retryNow": "Проверить сейчас"
|
||||
},
|
||||
"nav": {
|
||||
"dashboard": "Панель",
|
||||
|
||||
@@ -172,6 +172,16 @@ export interface Volume {
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
/** Docker daemon health check result. */
|
||||
export interface DockerHealth {
|
||||
connected: boolean;
|
||||
error?: string;
|
||||
category?: string;
|
||||
hints?: string[];
|
||||
platform?: string;
|
||||
checked_at?: string;
|
||||
}
|
||||
|
||||
/** A persistent event log entry. */
|
||||
export interface EventLogEntry {
|
||||
id: number;
|
||||
|
||||
Reference in New Issue
Block a user