From 342b1d676e24d27254368222bc06df3a6fc50b39 Mon Sep 17 00:00:00 2001 From: HarikrishnanD Date: Thu, 16 Oct 2025 16:25:32 +0530 Subject: [PATCH 1/2] fix(schedules): prevent action buttons overflow for long commands --- .../application/schedules/show-schedules.tsx | 34 +++++++------------ 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/apps/dokploy/components/dashboard/application/schedules/show-schedules.tsx b/apps/dokploy/components/dashboard/application/schedules/show-schedules.tsx index 3209b6e03..0b71be39c 100644 --- a/apps/dokploy/components/dashboard/application/schedules/show-schedules.tsx +++ b/apps/dokploy/components/dashboard/application/schedules/show-schedules.tsx @@ -44,14 +44,12 @@ export const ShowSchedules = ({ id, scheduleType = "application" }: Props) => { }, { enabled: !!id, - }, + } ); const utils = api.useUtils(); - const { mutateAsync: deleteSchedule, isLoading: isDeleting } = api.schedule.delete.useMutation(); - const { mutateAsync: runManually, isLoading } = api.schedule.runManually.useMutation(); @@ -67,7 +65,6 @@ export const ShowSchedules = ({ id, scheduleType = "application" }: Props) => { Schedule tasks to run automatically at specified intervals. - {schedules && schedules.length > 0 && ( )} @@ -75,7 +72,7 @@ export const ShowSchedules = ({ id, scheduleType = "application" }: Props) => { {isLoadingSchedules ? ( -
+
Loading scheduled tasks... @@ -91,13 +88,13 @@ export const ShowSchedules = ({ id, scheduleType = "application" }: Props) => { return (
-
+
-
+

{schedule.name} @@ -132,27 +129,25 @@ export const ShowSchedules = ({ id, scheduleType = "application" }: Props) => { )}

{schedule.command && ( -
- - +
+ + {schedule.command}
)}
- -
+
- @@ -163,13 +158,12 @@ export const ShowSchedules = ({ id, scheduleType = "application" }: Props) => { isLoading={isLoading} onClick={async () => { toast.success("Schedule run successfully"); - await runManually({ scheduleId: schedule.scheduleId, }) .then(async () => { await new Promise((resolve) => - setTimeout(resolve, 1500), + setTimeout(resolve, 1500) ); refetchSchedules(); }) @@ -178,19 +172,17 @@ export const ShowSchedules = ({ id, scheduleType = "application" }: Props) => { }); }} > - + Run Manual Schedule - - {