Skip to content

Commit 413ed4e

Browse files
[autofix.ci] apply automated fixes (attempt 2/3)
1 parent c2efe17 commit 413ed4e

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

apps/dokploy/components/dashboard/application/advanced/volumes/compose-volumes.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ interface ComposeVolumesProps {
1313
/**
1414
* Generates a display string for the mount path of a volume.
1515
*/
16-
const getMountPathDisplay = (
17-
volumeName: string,
18-
volumeData: any,
19-
): string => {
16+
const getMountPathDisplay = (volumeName: string, volumeData: any): string => {
2017
const hasUsage = volumeData?.usage && volumeData.usage.length > 0;
2118

2219
if (!hasUsage) {
@@ -25,9 +22,7 @@ const getMountPathDisplay = (
2522

2623
return volumeData.usage
2724
.map((usage: { service: string; mountPath: string }) => {
28-
const source = volumeData?.isBindMount
29-
? volumeData.hostPath
30-
: volumeName;
25+
const source = volumeData?.isBindMount ? volumeData.hostPath : volumeName;
3126
return `${source}:${usage.mountPath}`;
3227
})
3328
.join(", ");
@@ -58,7 +53,11 @@ const VolumeField = ({
5853
label,
5954
value,
6055
breakText = false,
61-
}: { label: string; value: string; breakText?: boolean }) => (
56+
}: {
57+
label: string;
58+
value: string;
59+
breakText?: boolean;
60+
}) => (
6261
<div className="flex flex-col gap-1 min-w-0">
6362
<span className="font-medium">{label}</span>
6463
<span

apps/dokploy/components/dashboard/application/advanced/volumes/show-volumes.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ export const ShowVolumes = ({ id, type }: Props) => {
6363
</AddVolumes>
6464
</CardHeader>
6565
<CardContent className="flex flex-col gap-4">
66-
{!data?.mounts?.length &&
67-
!Object.keys(composeVolumes || {}).length && (
66+
{!data?.mounts?.length && !Object.keys(composeVolumes || {}).length && (
6867
<div className="flex w-full flex-col items-center justify-center gap-3 pt-10">
6968
<Package className="size-8 text-muted-foreground" />
7069
<span className="text-base text-muted-foreground">

apps/dokploy/server/api/routers/compose.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,10 @@ export const composeRouter = createTRPCRouter({
417417
mountPath = parts[1];
418418
}
419419
}
420-
} else if (typeof volumeEntry === "object" && volumeEntry !== null) {
420+
} else if (
421+
typeof volumeEntry === "object" &&
422+
volumeEntry !== null
423+
) {
421424
// Long syntax: { type: 'volume', source: 'volume_name', target: '/path' }
422425
if (
423426
(volumeEntry as any).type === "volume" ||

0 commit comments

Comments
 (0)