From 0f96b961cd0f84d0d416b98b0283bad93caf3648 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Wed, 4 Nov 2026 08:09:11 -0500 Subject: [PATCH] feat(docker): calmer 'Docker not available' state Swap the text-heavy help box for three small icon chips (install, start daemon, grant access), tuck the raw error and full guidance into a collapsed Details disclosure, use the lucide Boxes illustration, and make Retry spin in place instead of flashing the full-page loader. --- frontend/src/i18n/locales/ar.json | 1 - frontend/src/i18n/locales/bn.json | 1 - frontend/src/i18n/locales/de.json | 1 - frontend/src/i18n/locales/en.json | 5 +- frontend/src/i18n/locales/es.json | 1 - frontend/src/i18n/locales/fr.json | 1 - frontend/src/i18n/locales/id.json | 1 - frontend/src/i18n/locales/it.json | 1 - frontend/src/i18n/locales/ko.json | 1 - frontend/src/i18n/locales/pl.json | 1 - frontend/src/i18n/locales/pt.json | 1 - frontend/src/i18n/locales/ru.json | 1 - frontend/src/i18n/locales/th.json | 1 - frontend/src/i18n/locales/tr.json | 1 - frontend/src/i18n/locales/vi.json | 1 - frontend/src/i18n/locales/zh-Hans.json | 1 - frontend/src/i18n/locales/zh-Hant.json | 1 - frontend/src/pages/Docker.jsx | 54 ++++++++------ frontend/src/styles/pages/_docker.scss | 99 +++++++++++++++++--------- 19 files changed, 102 insertions(+), 72 deletions(-) diff --git a/frontend/src/i18n/locales/ar.json b/frontend/src/i18n/locales/ar.json index 79553fa5..30083093 100644 --- a/frontend/src/i18n/locales/ar.json +++ b/frontend/src/i18n/locales/ar.json @@ -2096,7 +2096,6 @@ "onLinuxMakeSureTheDocker": "على Linux، تأكد من بدء تشغيل البرنامج الخفي Docker", "retryConnection": "أعد محاولة الاتصال", "targets": "الأهداف", - "toUseDockerManagement": "لاستخدام إدارة Docker:", "verifyTheUserHasPermissionsTo": "تحقق من أن المستخدم لديه أذونات للوصول إلى Docker", "volumes": "وحدات التخزين" }, diff --git a/frontend/src/i18n/locales/bn.json b/frontend/src/i18n/locales/bn.json index e509e9e5..8e55e567 100644 --- a/frontend/src/i18n/locales/bn.json +++ b/frontend/src/i18n/locales/bn.json @@ -2096,7 +2096,6 @@ "onLinuxMakeSureTheDocker": "Linux এ, নিশ্চিত করুন যে Docker ডেমন শুরু হয়েছে", "retryConnection": "সংযোগ পুনরায় চেষ্টা করুন", "targets": "টার্গেট", - "toUseDockerManagement": "Docker ব্যবস্থাপনা ব্যবহার করতে:", "verifyTheUserHasPermissionsTo": "ব্যবহারকারীর Docker অ্যাক্সেস করার অনুমতি আছে তা যাচাই করুন", "volumes": "ভলিউম" }, diff --git a/frontend/src/i18n/locales/de.json b/frontend/src/i18n/locales/de.json index b4e766af..a9309853 100644 --- a/frontend/src/i18n/locales/de.json +++ b/frontend/src/i18n/locales/de.json @@ -2096,7 +2096,6 @@ "onLinuxMakeSureTheDocker": "Stellen Sie unter Linux sicher, dass der Docker-Daemon gestartet ist", "retryConnection": "Verbindung erneut versuchen", "targets": "Ziele", - "toUseDockerManagement": "So verwenden Sie die Docker-Verwaltung:", "verifyTheUserHasPermissionsTo": "Stellen Sie sicher, dass der Benutzer über Berechtigungen zum Zugriff auf Docker verfügt", "volumes": "Volumes" }, diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index 23a8d25e..57195b1a 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -2089,15 +2089,18 @@ "compose": "Compose", "containers": "Containers", "couldntConnectToDaemon": "Couldn't connect to the Docker daemon.", + "details": "Details", "dockerIsNotInstalledOrNot": "Docker is not installed or not running on this system.", "dockerNotAvailable": "Docker not available", "ensureDockerDesktopIsInstalledAnd": "Ensure Docker Desktop is installed and running", + "grantAccess": "Grant access", "images": "Images", + "installDocker": "Install Docker", "networks": "Networks", "onLinuxMakeSureTheDocker": "On Linux, make sure the Docker daemon is started", "retryConnection": "Retry connection", + "startTheDaemon": "Start the daemon", "targets": "Targets", - "toUseDockerManagement": "To use Docker management:", "verifyTheUserHasPermissionsTo": "Verify the user has permissions to access Docker", "volumes": "Volumes" }, diff --git a/frontend/src/i18n/locales/es.json b/frontend/src/i18n/locales/es.json index 9165f108..a6ca8a7e 100644 --- a/frontend/src/i18n/locales/es.json +++ b/frontend/src/i18n/locales/es.json @@ -2096,7 +2096,6 @@ "onLinuxMakeSureTheDocker": "En Linux, asegúrate de que el demonio de Docker esté iniciado", "retryConnection": "Reintentar conexión", "targets": "Destinos", - "toUseDockerManagement": "Para usar la gestión de Docker:", "verifyTheUserHasPermissionsTo": "Verifica que el usuario tenga permisos para acceder a Docker", "volumes": "Volúmenes" }, diff --git a/frontend/src/i18n/locales/fr.json b/frontend/src/i18n/locales/fr.json index 74d98fba..fb6f9c5f 100644 --- a/frontend/src/i18n/locales/fr.json +++ b/frontend/src/i18n/locales/fr.json @@ -2096,7 +2096,6 @@ "onLinuxMakeSureTheDocker": "Sur Linux, assurez-vous que le démon Docker est démarré", "retryConnection": "Réessayer la connexion", "targets": "Cibles", - "toUseDockerManagement": "Pour utiliser la gestion Docker :", "verifyTheUserHasPermissionsTo": "Vérifiez que l'utilisateur dispose des autorisations nécessaires pour accéder à Docker.", "volumes": "Volumes" }, diff --git a/frontend/src/i18n/locales/id.json b/frontend/src/i18n/locales/id.json index 508006ff..f42bafe0 100644 --- a/frontend/src/i18n/locales/id.json +++ b/frontend/src/i18n/locales/id.json @@ -2096,7 +2096,6 @@ "onLinuxMakeSureTheDocker": "Pada Linux, pastikan daemon Docker dimulai", "retryConnection": "Coba Lagi Koneksi", "targets": "Target", - "toUseDockerManagement": "Untuk menggunakan manajemen Docker:", "verifyTheUserHasPermissionsTo": "Verifikasikan bahwa pengguna memiliki izin untuk mengakses Docker", "volumes": "Volume" }, diff --git a/frontend/src/i18n/locales/it.json b/frontend/src/i18n/locales/it.json index 48e1f778..afc788fe 100644 --- a/frontend/src/i18n/locales/it.json +++ b/frontend/src/i18n/locales/it.json @@ -2096,7 +2096,6 @@ "onLinuxMakeSureTheDocker": "Su Linux, assicurati che il demone Docker sia avviato", "retryConnection": "Riprovare la connessione", "targets": "Destinazioni", - "toUseDockerManagement": "Per utilizzare la gestione Docker:", "verifyTheUserHasPermissionsTo": "Verificare che l'utente disponga delle autorizzazioni per accedere a Docker", "volumes": "Volumi" }, diff --git a/frontend/src/i18n/locales/ko.json b/frontend/src/i18n/locales/ko.json index 9ac6bcce..bd566b78 100644 --- a/frontend/src/i18n/locales/ko.json +++ b/frontend/src/i18n/locales/ko.json @@ -2096,7 +2096,6 @@ "onLinuxMakeSureTheDocker": "Linux에서는 Docker 데몬이 시작되었는지 확인하세요.", "retryConnection": "연결 재시도", "targets": "대상", - "toUseDockerManagement": "Docker 관리를 사용하려면:", "verifyTheUserHasPermissionsTo": "사용자에게 Docker에 액세스할 수 있는 권한이 있는지 확인", "volumes": "볼륨" }, diff --git a/frontend/src/i18n/locales/pl.json b/frontend/src/i18n/locales/pl.json index edd33525..5b49e3cf 100644 --- a/frontend/src/i18n/locales/pl.json +++ b/frontend/src/i18n/locales/pl.json @@ -2096,7 +2096,6 @@ "onLinuxMakeSureTheDocker": "W przypadku Linux upewnij się, że demon Docker jest uruchomiony", "retryConnection": "Ponów próbę połączenia", "targets": "Cele", - "toUseDockerManagement": "Aby skorzystać z zarządzania Docker:", "verifyTheUserHasPermissionsTo": "Sprawdź, czy użytkownik ma uprawnienia dostępu do Docker", "volumes": "Woluminy" }, diff --git a/frontend/src/i18n/locales/pt.json b/frontend/src/i18n/locales/pt.json index fc379fc3..80dde31b 100644 --- a/frontend/src/i18n/locales/pt.json +++ b/frontend/src/i18n/locales/pt.json @@ -2096,7 +2096,6 @@ "onLinuxMakeSureTheDocker": "No Linux, certifique-se de que o daemon Docker esteja iniciado", "retryConnection": "Tentar novamente a conexão", "targets": "Alvos", - "toUseDockerManagement": "Para usar o gerenciamento do Docker:", "verifyTheUserHasPermissionsTo": "Verifique se o usuário tem permissões para acessar o Docker", "volumes": "Volumes" }, diff --git a/frontend/src/i18n/locales/ru.json b/frontend/src/i18n/locales/ru.json index 094882ff..a5494ed5 100644 --- a/frontend/src/i18n/locales/ru.json +++ b/frontend/src/i18n/locales/ru.json @@ -2096,7 +2096,6 @@ "onLinuxMakeSureTheDocker": "В Linux убедитесь, что демон Docker запущен.", "retryConnection": "Повторить попытку подключения", "targets": "Цели", - "toUseDockerManagement": "Чтобы использовать управление Docker:", "verifyTheUserHasPermissionsTo": "Убедитесь, что у пользователя есть разрешения на доступ к Docker.", "volumes": "Тома" }, diff --git a/frontend/src/i18n/locales/th.json b/frontend/src/i18n/locales/th.json index 597ce1cd..e193cefa 100644 --- a/frontend/src/i18n/locales/th.json +++ b/frontend/src/i18n/locales/th.json @@ -2096,7 +2096,6 @@ "onLinuxMakeSureTheDocker": "บน Linux ตรวจสอบให้แน่ใจว่า Docker daemon เริ่มทำงานแล้ว", "retryConnection": "ลองเชื่อมต่ออีกครั้ง", "targets": "เป้าหมาย", - "toUseDockerManagement": "หากต้องการใช้การจัดการ Docker:", "verifyTheUserHasPermissionsTo": "ตรวจสอบว่าผู้ใช้มีสิทธิ์ในการเข้าถึง Docker", "volumes": "โวลุ่ม" }, diff --git a/frontend/src/i18n/locales/tr.json b/frontend/src/i18n/locales/tr.json index ed79b36d..2afc0011 100644 --- a/frontend/src/i18n/locales/tr.json +++ b/frontend/src/i18n/locales/tr.json @@ -2096,7 +2096,6 @@ "onLinuxMakeSureTheDocker": "Linux'de Docker arka plan programının başlatıldığından emin olun", "retryConnection": "Bağlantıyı Yeniden Dene", "targets": "Hedefler", - "toUseDockerManagement": "Docker yönetimini kullanmak için:", "verifyTheUserHasPermissionsTo": "Kullanıcının Docker'ye erişim izinleri olduğunu doğrulayın", "volumes": "Birimler" }, diff --git a/frontend/src/i18n/locales/vi.json b/frontend/src/i18n/locales/vi.json index 351caab8..cfe0d153 100644 --- a/frontend/src/i18n/locales/vi.json +++ b/frontend/src/i18n/locales/vi.json @@ -2096,7 +2096,6 @@ "onLinuxMakeSureTheDocker": "Trên Linux, hãy đảm bảo daemon Docker được khởi động", "retryConnection": "Thử lại kết nối", "targets": "Mục tiêu", - "toUseDockerManagement": "Để sử dụng quản lý Docker:", "verifyTheUserHasPermissionsTo": "Xác minh người dùng có quyền truy cập Docker", "volumes": "Volume" }, diff --git a/frontend/src/i18n/locales/zh-Hans.json b/frontend/src/i18n/locales/zh-Hans.json index 0e967f9a..66bfc326 100644 --- a/frontend/src/i18n/locales/zh-Hans.json +++ b/frontend/src/i18n/locales/zh-Hans.json @@ -2096,7 +2096,6 @@ "onLinuxMakeSureTheDocker": "在 Linux 上,确保 Docker 守护进程已启动", "retryConnection": "重试连接", "targets": "目标", - "toUseDockerManagement": "使用 Docker 管理:", "verifyTheUserHasPermissionsTo": "验证用户是否有访问Docker的权限", "volumes": "卷" }, diff --git a/frontend/src/i18n/locales/zh-Hant.json b/frontend/src/i18n/locales/zh-Hant.json index 742c9ba2..5a31e556 100644 --- a/frontend/src/i18n/locales/zh-Hant.json +++ b/frontend/src/i18n/locales/zh-Hant.json @@ -2096,7 +2096,6 @@ "onLinuxMakeSureTheDocker": "在 Linux 上,確保 Docker 守護程式已啟動", "retryConnection": "重試連線", "targets": "目標", - "toUseDockerManagement": "使用 Docker 管理:", "verifyTheUserHasPermissionsTo": "驗證使用者是否有權限存取 Docker", "volumes": "磁碟區" }, diff --git a/frontend/src/pages/Docker.jsx b/frontend/src/pages/Docker.jsx index dbe1eb0e..3c154d10 100644 --- a/frontend/src/pages/Docker.jsx +++ b/frontend/src/pages/Docker.jsx @@ -6,7 +6,7 @@ import { Button } from '@/components/ui/button'; import { MetricCard, KpiBand } from '@/components/ds'; import ServerPicker from '../components/ServerPicker'; import PageLayout from '@/layouts/PageLayout'; -import { Box, Layers, HardDrive, Network as NetworkIcon, Package } from 'lucide-react'; +import { Box, Boxes, ChevronDown, Download, Power, RefreshCw, UserCheck, Layers, HardDrive, Network as NetworkIcon, Package } from 'lucide-react'; import { ServerContext, VALID_TABS, @@ -27,6 +27,7 @@ const Docker = () => { const [activeTab] = useTabParam('/docker', VALID_TABS); const [dockerStatus, setDockerStatus] = useState(null); const [loading, setLoading] = useState(true); + const [retrying, setRetrying] = useState(false); const [selectedServer, setSelectedServer] = useState(LOCAL_DOCKER_TARGET); const [availableServers, setAvailableServers] = useState([LOCAL_DOCKER_TARGET]); const [stats, setStats] = useState({ @@ -65,8 +66,8 @@ const Docker = () => { return () => { cancelled = true; }; }, []); - async function checkDockerStatus() { - setLoading(true); + async function checkDockerStatus(silent = false) { + if (!silent) setLoading(true); try { if (selectedServer.id === 'local') { const status = await api.getDockerStatus(); @@ -93,6 +94,12 @@ const Docker = () => { } } + async function retry() { + setRetrying(true); + await checkDockerStatus(true); + setRetrying(false); + } + async function loadStats() { try { let containersData, imagesData, volumesData, networksData; @@ -174,35 +181,40 @@ const Docker = () => { } title={t('common.labels.docker', 'Docker')}>
- - - - - - - - +

{t('app.docker.dockerNotAvailable', 'Docker not available')}

{t('app.docker.dockerIsNotInstalledOrNot', 'Docker is not installed or not running on this system.')}

-
+
    +
  • + + {t('app.docker.installDocker', 'Install Docker')} +
  • +
  • + + {t('app.docker.startTheDaemon', 'Start the daemon')} +
  • +
  • + + {t('app.docker.grantAccess', 'Grant access')} +
  • +
+
+ + {t('app.docker.details', 'Details')} + + {dockerStatus?.error || t('app.docker.couldntConnectToDaemon', "Couldn't connect to the Docker daemon.")} -
-
-

{t('app.docker.toUseDockerManagement', 'To use Docker management:')}

  • {t('app.docker.ensureDockerDesktopIsInstalledAnd', 'Ensure Docker Desktop is installed and running')}
  • {t('app.docker.onLinuxMakeSureTheDocker', 'On Linux, make sure the Docker daemon is started')}
  • {t('app.docker.verifyTheUserHasPermissionsTo', 'Verify the user has permissions to access Docker')}
-
-
diff --git a/frontend/src/styles/pages/_docker.scss b/frontend/src/styles/pages/_docker.scss index 00c7dcf9..f4e81642 100644 --- a/frontend/src/styles/pages/_docker.scss +++ b/frontend/src/styles/pages/_docker.scss @@ -155,17 +155,17 @@ margin: 0 auto; .docker-unavailable-icon { - width: 100px; - height: 100px; + width: 72px; + height: 72px; display: flex; align-items: center; justify-content: center; background: fade($color-docker, 10%); border-radius: $radius-overlay; - margin-bottom: $space-6; + margin-block-end: $space-5; + color: $color-docker; svg { - stroke: $color-docker; opacity: 0.6; } } @@ -183,12 +183,60 @@ margin: 0 0 $space-4 0; } - .docker-unavailable-details { + .docker-unavailable-steps { + list-style: none; + margin: 0 0 $space-4 0; + padding: 0; width: 100%; - margin-bottom: $space-6; + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: $space-2; + + li { + display: flex; + flex-direction: column; + align-items: center; + gap: $space-2; + padding: $space-3 $space-2; + background: $bg-hover; + border: 1px solid $border-subtle; + border-radius: $radius-control; + color: $text-secondary; + font-size: $text-xs; + overflow-wrap: anywhere; + } + } + + .docker-unavailable-disclosure { + width: 100%; + margin-block-end: $space-6; + text-align: start; + + summary { + display: inline-flex; + align-items: center; + gap: $space-1; + cursor: pointer; + color: $text-tertiary; + font-size: $text-xs; + list-style: none; + + &::-webkit-details-marker { + display: none; + } + + svg { + transition: transform 0.15s ease; + } + } + + &[open] summary svg { + transform: rotate(180deg); + } code { display: block; + margin-block-start: $space-3; padding: $space-3 $space-4; background: $bg-hover; border: 1px solid $border-subtle; @@ -196,39 +244,22 @@ font-family: $font-mono; font-size: $text-xs; color: $text-tertiary; - word-break: break-all; - text-align: left; - } - } - - .docker-unavailable-help { - width: 100%; - padding: $space-5; - background: $bg-hover; - border-radius: $radius-card; - text-align: left; - margin-bottom: $space-6; - - h4 { - font-size: $text-xs; - font-weight: $font-weight-semibold; - margin: 0 0 $space-3 0; - color: $text-primary; + overflow-wrap: anywhere; } ul { - margin: 0; - padding-left: $space-5; + margin: $space-3 0 0 0; + padding-inline-start: $space-5; + font-size: $text-xs; + color: $text-secondary; + } + } - li { - font-size: $text-xs; - color: $text-secondary; - margin-bottom: $space-2; + .docker-unavailable-spin { + animation: spinner-rotate 0.8s linear infinite; - &:last-child { - margin-bottom: 0; - } - } + @media (prefers-reduced-motion: reduce) { + animation: none; } }