mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-15 16:35:17 +00:00
[autofix.ci] apply automated fixes
This commit is contained in:
@@ -73,14 +73,18 @@ export function ShowQueueTable(props: { embedded?: boolean }) {
|
|||||||
);
|
);
|
||||||
const { data: isCloud } = api.settings.isCloud.useQuery();
|
const { data: isCloud } = api.settings.isCloud.useQuery();
|
||||||
const utils = api.useUtils();
|
const utils = api.useUtils();
|
||||||
const { mutateAsync: cancelApplicationDeployment, isPending: isCancellingApp } =
|
const {
|
||||||
api.application.cancelDeployment.useMutation({
|
mutateAsync: cancelApplicationDeployment,
|
||||||
onSuccess: () => void utils.deployment.queueList.invalidate(),
|
isPending: isCancellingApp,
|
||||||
});
|
} = api.application.cancelDeployment.useMutation({
|
||||||
const { mutateAsync: cancelComposeDeployment, isPending: isCancellingCompose } =
|
onSuccess: () => void utils.deployment.queueList.invalidate(),
|
||||||
api.compose.cancelDeployment.useMutation({
|
});
|
||||||
onSuccess: () => void utils.deployment.queueList.invalidate(),
|
const {
|
||||||
});
|
mutateAsync: cancelComposeDeployment,
|
||||||
|
isPending: isCancellingCompose,
|
||||||
|
} = api.compose.cancelDeployment.useMutation({
|
||||||
|
onSuccess: () => void utils.deployment.queueList.invalidate(),
|
||||||
|
});
|
||||||
const isCancelling = isCancellingApp || isCancellingCompose;
|
const isCancelling = isCancellingApp || isCancellingCompose;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -149,11 +153,14 @@ export function ShowQueueTable(props: { embedded?: boolean }) {
|
|||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
<span className="text-muted-foreground text-xs">—</span>
|
<span className="text-muted-foreground text-xs">
|
||||||
|
—
|
||||||
|
</span>
|
||||||
)}
|
)}
|
||||||
{isCloud &&
|
{isCloud &&
|
||||||
row.state === "active" &&
|
row.state === "active" &&
|
||||||
(d?.applicationId != null || d?.composeId != null) && (
|
(d?.applicationId != null ||
|
||||||
|
d?.composeId != null) && (
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="sm"
|
size="sm"
|
||||||
|
|||||||
@@ -28,10 +28,7 @@ import {
|
|||||||
server,
|
server,
|
||||||
} from "@/server/db/schema";
|
} from "@/server/db/schema";
|
||||||
import { myQueue } from "@/server/queues/queueSetup";
|
import { myQueue } from "@/server/queues/queueSetup";
|
||||||
import {
|
import { fetchDeployApiJobs, type QueueJobRow } from "@/server/utils/deploy";
|
||||||
fetchDeployApiJobs,
|
|
||||||
type QueueJobRow,
|
|
||||||
} from "@/server/utils/deploy";
|
|
||||||
import { createTRPCRouter, protectedProcedure } from "../trpc";
|
import { createTRPCRouter, protectedProcedure } from "../trpc";
|
||||||
|
|
||||||
export const deploymentRouter = createTRPCRouter({
|
export const deploymentRouter = createTRPCRouter({
|
||||||
|
|||||||
@@ -889,9 +889,7 @@ export const findAllDeploymentsCentralized = async (
|
|||||||
}
|
}
|
||||||
|
|
||||||
const conditions = [
|
const conditions = [
|
||||||
...(appIds.length > 0
|
...(appIds.length > 0 ? [inArray(deployments.applicationId, appIds)] : []),
|
||||||
? [inArray(deployments.applicationId, appIds)]
|
|
||||||
: []),
|
|
||||||
...(compIds.length > 0 ? [inArray(deployments.composeId, compIds)] : []),
|
...(compIds.length > 0 ? [inArray(deployments.composeId, compIds)] : []),
|
||||||
];
|
];
|
||||||
const whereClause =
|
const whereClause =
|
||||||
|
|||||||
Reference in New Issue
Block a user