mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-13 09:55:29 +02:00
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.
This commit is contained in:
@@ -118,12 +118,12 @@ export const settingsRouter = createTRPCRouter({
|
||||
reloadTraefik: adminProcedure
|
||||
.input(apiServerSchema)
|
||||
.mutation(async ({ input }) => {
|
||||
try {
|
||||
await reloadDockerResource("dokploy-traefik", input?.serverId);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
// Run in background so the request returns immediately; avoids proxy timeouts.
|
||||
void reloadDockerResource("dokploy-traefik", input?.serverId).catch(
|
||||
(err) => {
|
||||
console.error("reloadTraefik background:", err);
|
||||
},
|
||||
);
|
||||
return true;
|
||||
}),
|
||||
toggleDashboard: adminProcedure
|
||||
|
||||
Reference in New Issue
Block a user