mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-10 05:55:18 +00:00
[autofix.ci] apply automated fixes
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
import {
|
import {
|
||||||
ChevronDown,
|
ChevronDown,
|
||||||
ChevronUp,
|
ChevronUp,
|
||||||
Clock, Copy,
|
Clock,
|
||||||
|
Copy,
|
||||||
Loader2,
|
Loader2,
|
||||||
RefreshCcw,
|
RefreshCcw,
|
||||||
RocketIcon,
|
RocketIcon,
|
||||||
@@ -150,18 +151,18 @@ export const ShowDeployments = ({
|
|||||||
</div>
|
</div>
|
||||||
<div className="flex flex-row items-center flex-wrap gap-2">
|
<div className="flex flex-row items-center flex-wrap gap-2">
|
||||||
{(type === "application" || type === "compose") && (
|
{(type === "application" || type === "compose") && (
|
||||||
<ClearDeployments id={id} type={type}/>
|
<ClearDeployments id={id} type={type} />
|
||||||
)}
|
)}
|
||||||
{(type === "application" || type === "compose") && (
|
{(type === "application" || type === "compose") && (
|
||||||
<KillBuild id={id} type={type}/>
|
<KillBuild id={id} type={type} />
|
||||||
)}
|
)}
|
||||||
{(type === "application" || type === "compose") && (
|
{(type === "application" || type === "compose") && (
|
||||||
<CancelQueues id={id} type={type}/>
|
<CancelQueues id={id} type={type} />
|
||||||
)}
|
)}
|
||||||
{type === "application" && (
|
{type === "application" && (
|
||||||
<ShowRollbackSettings applicationId={id}>
|
<ShowRollbackSettings applicationId={id}>
|
||||||
<Button variant="outline">
|
<Button variant="outline">
|
||||||
Configure Rollbacks <Settings className="size-4"/>
|
Configure Rollbacks <Settings className="size-4" />
|
||||||
</Button>
|
</Button>
|
||||||
</ShowRollbackSettings>
|
</ShowRollbackSettings>
|
||||||
)}
|
)}
|
||||||
@@ -229,17 +230,19 @@ export const ShowDeployments = ({
|
|||||||
className="p-2 rounded-md ml-1 mr-1 hover:border-primary hover:text-primary-foreground hover:bg-primary hover:cursor-pointer"
|
className="p-2 rounded-md ml-1 mr-1 hover:border-primary hover:text-primary-foreground hover:bg-primary hover:cursor-pointer"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
copy(`${url}/api/deploy${type === "compose" ? "/compose" : ""}/${refreshToken}`);
|
copy(
|
||||||
|
`${url}/api/deploy${type === "compose" ? "/compose" : ""}/${refreshToken}`,
|
||||||
|
);
|
||||||
toast.success("Copied to clipboard.");
|
toast.success("Copied to clipboard.");
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{`${url}/api/deploy${
|
{`${url}/api/deploy${
|
||||||
type === "compose" ? "/compose" : ""
|
type === "compose" ? "/compose" : ""
|
||||||
}/${refreshToken}`}
|
}/${refreshToken}`}
|
||||||
<Copy className="h-4 w-4 ml-1 text-muted-foreground"/>
|
<Copy className="h-4 w-4 ml-1 text-muted-foreground" />
|
||||||
</Badge>
|
</Badge>
|
||||||
{(type === "application" || type === "compose") && (
|
{(type === "application" || type === "compose") && (
|
||||||
<RefreshToken id={id} type={type}/>
|
<RefreshToken id={id} type={type} />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -248,14 +251,14 @@ export const ShowDeployments = ({
|
|||||||
|
|
||||||
{isLoadingDeployments ? (
|
{isLoadingDeployments ? (
|
||||||
<div className="flex w-full flex-row items-center justify-center gap-3 pt-10 min-h-[25vh]">
|
<div className="flex w-full flex-row items-center justify-center gap-3 pt-10 min-h-[25vh]">
|
||||||
<Loader2 className="size-6 text-muted-foreground animate-spin"/>
|
<Loader2 className="size-6 text-muted-foreground animate-spin" />
|
||||||
<span className="text-base text-muted-foreground">
|
<span className="text-base text-muted-foreground">
|
||||||
Loading deployments...
|
Loading deployments...
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
) : deployments?.length === 0 ? (
|
) : deployments?.length === 0 ? (
|
||||||
<div className="flex w-full flex-col items-center justify-center gap-3 pt-10 min-h-[25vh]">
|
<div className="flex w-full flex-col items-center justify-center gap-3 pt-10 min-h-[25vh]">
|
||||||
<RocketIcon className="size-8 text-muted-foreground"/>
|
<RocketIcon className="size-8 text-muted-foreground" />
|
||||||
<span className="text-base text-muted-foreground">
|
<span className="text-base text-muted-foreground">
|
||||||
No deployments found
|
No deployments found
|
||||||
</span>
|
</span>
|
||||||
@@ -277,8 +280,7 @@ export const ShowDeployments = ({
|
|||||||
className="flex flex-col gap-4 rounded-lg border p-4 sm:flex-row sm:items-center sm:justify-between"
|
className="flex flex-col gap-4 rounded-lg border p-4 sm:flex-row sm:items-center sm:justify-between"
|
||||||
>
|
>
|
||||||
<div className="flex flex-1 flex-col min-w-0">
|
<div className="flex flex-1 flex-col min-w-0">
|
||||||
<span
|
<span className="flex items-center gap-4 font-medium capitalize text-foreground">
|
||||||
className="flex items-center gap-4 font-medium capitalize text-foreground">
|
|
||||||
{index + 1}. {deployment.status}
|
{index + 1}. {deployment.status}
|
||||||
<StatusTooltip
|
<StatusTooltip
|
||||||
status={deployment?.status}
|
status={deployment?.status}
|
||||||
@@ -287,8 +289,7 @@ export const ShowDeployments = ({
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div className="flex flex-col gap-1">
|
<div className="flex flex-col gap-1">
|
||||||
<span
|
<span className="break-words text-sm text-muted-foreground whitespace-pre-wrap">
|
||||||
className="break-words text-sm text-muted-foreground whitespace-pre-wrap">
|
|
||||||
{isExpanded || !needsTruncation
|
{isExpanded || !needsTruncation
|
||||||
? titleText
|
? titleText
|
||||||
: truncateDescription(titleText)}
|
: truncateDescription(titleText)}
|
||||||
@@ -314,12 +315,12 @@ export const ShowDeployments = ({
|
|||||||
>
|
>
|
||||||
{isExpanded ? (
|
{isExpanded ? (
|
||||||
<>
|
<>
|
||||||
<ChevronUp className="size-3"/>
|
<ChevronUp className="size-3" />
|
||||||
Show less
|
Show less
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<ChevronDown className="size-3"/>
|
<ChevronDown className="size-3" />
|
||||||
Show more
|
Show more
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
@@ -333,17 +334,15 @@ export const ShowDeployments = ({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div className="flex w-full flex-col items-start gap-2 sm:w-auto sm:max-w-[300px] sm:items-end sm:justify-start">
|
||||||
className="flex w-full flex-col items-start gap-2 sm:w-auto sm:max-w-[300px] sm:items-end sm:justify-start">
|
<div className="text-sm capitalize text-muted-foreground flex flex-wrap items-center gap-2">
|
||||||
<div
|
<DateTooltip date={deployment.createdAt} />
|
||||||
className="text-sm capitalize text-muted-foreground flex flex-wrap items-center gap-2">
|
|
||||||
<DateTooltip date={deployment.createdAt}/>
|
|
||||||
{deployment.startedAt && deployment.finishedAt && (
|
{deployment.startedAt && deployment.finishedAt && (
|
||||||
<Badge
|
<Badge
|
||||||
variant="outline"
|
variant="outline"
|
||||||
className="text-[10px] gap-1 flex items-center"
|
className="text-[10px] gap-1 flex items-center"
|
||||||
>
|
>
|
||||||
<Clock className="size-3"/>
|
<Clock className="size-3" />
|
||||||
{formatDuration(
|
{formatDuration(
|
||||||
Math.floor(
|
Math.floor(
|
||||||
(new Date(deployment.finishedAt).getTime() -
|
(new Date(deployment.finishedAt).getTime() -
|
||||||
@@ -355,8 +354,7 @@ export const ShowDeployments = ({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div className="flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:justify-end">
|
||||||
className="flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:justify-end">
|
|
||||||
{deployment.pid && deployment.status === "running" && (
|
{deployment.pid && deployment.status === "running" && (
|
||||||
<DialogAction
|
<DialogAction
|
||||||
title="Kill Process"
|
title="Kill Process"
|
||||||
@@ -415,7 +413,7 @@ export const ShowDeployments = ({
|
|||||||
isLoading={isRemovingDeployment}
|
isLoading={isRemovingDeployment}
|
||||||
>
|
>
|
||||||
Delete
|
Delete
|
||||||
<Trash2 className="size-4"/>
|
<Trash2 className="size-4" />
|
||||||
</Button>
|
</Button>
|
||||||
</DialogAction>
|
</DialogAction>
|
||||||
)}
|
)}
|
||||||
@@ -459,8 +457,7 @@ export const ShowDeployments = ({
|
|||||||
isLoading={isRollingBack}
|
isLoading={isRollingBack}
|
||||||
className="w-full sm:w-auto"
|
className="w-full sm:w-auto"
|
||||||
>
|
>
|
||||||
<RefreshCcw
|
<RefreshCcw className="size-4 text-primary group-hover:text-red-500" />
|
||||||
className="size-4 text-primary group-hover:text-red-500"/>
|
|
||||||
Rollback
|
Rollback
|
||||||
</Button>
|
</Button>
|
||||||
</DialogAction>
|
</DialogAction>
|
||||||
|
|||||||
Reference in New Issue
Block a user