Skip to content

Commit 335a16b

Browse files
authored
Merge pull request #2114 from Dokploy/canary
🚀 Release v0.23.6
2 parents 274f380 + 2fe7349 commit 335a16b

13 files changed

Lines changed: 5953 additions & 18 deletions

File tree

apps/dokploy/components/dashboard/application/deployments/show-deployments.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ export const ShowDeployments = ({
6262

6363
const { mutateAsync: rollback, isLoading: isRollingBack } =
6464
api.rollback.rollback.useMutation();
65+
const { mutateAsync: killProcess, isLoading: isKillingProcess } =
66+
api.deployment.killProcess.useMutation();
6567

6668
const [url, setUrl] = React.useState("");
6769
useEffect(() => {
@@ -170,6 +172,32 @@ export const ShowDeployments = ({
170172
</div>
171173

172174
<div className="flex flex-row items-center gap-2">
175+
{deployment.pid && deployment.status === "running" && (
176+
<DialogAction
177+
title="Kill Process"
178+
description="Are you sure you want to kill the process?"
179+
type="default"
180+
onClick={async () => {
181+
await killProcess({
182+
deploymentId: deployment.deploymentId,
183+
})
184+
.then(() => {
185+
toast.success("Process killed successfully");
186+
})
187+
.catch(() => {
188+
toast.error("Error killing process");
189+
});
190+
}}
191+
>
192+
<Button
193+
variant="destructive"
194+
size="sm"
195+
isLoading={isKillingProcess}
196+
>
197+
Kill Process
198+
</Button>
199+
</DialogAction>
200+
)}
173201
<Button
174202
onClick={() => {
175203
setActiveLog(deployment);

apps/dokploy/components/dashboard/application/schedules/show-schedules.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,16 @@ export const ShowSchedules = ({ id, scheduleType = "application" }: Props) => {
166166

167167
await runManually({
168168
scheduleId: schedule.scheduleId,
169-
}).then(async () => {
170-
await new Promise((resolve) =>
171-
setTimeout(resolve, 1500),
172-
);
173-
refetchSchedules();
174-
});
169+
})
170+
.then(async () => {
171+
await new Promise((resolve) =>
172+
setTimeout(resolve, 1500),
173+
);
174+
refetchSchedules();
175+
})
176+
.catch(() => {
177+
toast.error("Error running schedule");
178+
});
175179
}}
176180
>
177181
<Play className="size-4 transition-colors" />

apps/dokploy/components/dashboard/settings/cluster/nodes/show-nodes-modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const ShowNodesModal = ({ serverId }: Props) => {
2020
Show Swarm Nodes
2121
</DropdownMenuItem>
2222
</DialogTrigger>
23-
<DialogContent className="sm:max-w-5xl overflow-y-auto max-h-screen ">
23+
<DialogContent className="min-w-[70vw] overflow-y-auto max-h-screen">
2424
<div className="grid w-full gap-1">
2525
<ShowNodes serverId={serverId} />
2626
</div>

apps/dokploy/components/ui/badge.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type * as React from "react";
44
import { cn } from "@/lib/utils";
55

66
const badgeVariants = cva(
7-
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
7+
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold whitespace-nowrap transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
88
{
99
variants: {
1010
variant: {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE "deployment" ADD COLUMN "pid" text;

0 commit comments

Comments
 (0)