From a1a348e22da658f88ad9b5a5f790233bf9af42fe Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Sat, 7 Feb 2026 00:53:32 -0600 Subject: [PATCH] feat(dashboard): enhance Traefik actions with health check integration - Added a new health check mutation for reloading Traefik, improving user feedback during the reload process. - Updated button states to reflect the execution status of health checks, preventing user actions during ongoing operations. - Refactored error handling for Traefik reload to provide clearer feedback on failures. --- .../servers/actions/show-traefik-actions.tsx | 34 ++++++++++++++----- apps/dokploy/server/api/routers/settings.ts | 12 +++---- 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/apps/dokploy/components/dashboard/settings/servers/actions/show-traefik-actions.tsx b/apps/dokploy/components/dashboard/settings/servers/actions/show-traefik-actions.tsx index 36761973c..5b4d751ff 100644 --- a/apps/dokploy/components/dashboard/settings/servers/actions/show-traefik-actions.tsx +++ b/apps/dokploy/components/dashboard/settings/servers/actions/show-traefik-actions.tsx @@ -39,12 +39,22 @@ export const ShowTraefikActions = ({ serverId }: Props) => { isExecuting: isHealthCheckExecuting, } = useHealthCheckAfterMutation({ initialDelay: 5000, + pollInterval: 4000, successMessage: "Traefik dashboard updated successfully", onSuccess: () => { refetchDashboard(); }, }); + const { + execute: executeReloadWithHealthCheck, + isExecuting: isReloadHealthCheckExecuting, + } = useHealthCheckAfterMutation({ + initialDelay: 5000, + pollInterval: 4000, + successMessage: "Traefik Reloaded", + }); + return ( { disabled={ reloadTraefikIsLoading || toggleDashboardIsLoading || - isHealthCheckExecuting + isHealthCheckExecuting || + isReloadHealthCheckExecuting } >