Skip to content

Commit df9aa50

Browse files
authored
Merge pull request #4166 from Dokploy/feat/docker-cleanup-tooltip
feat: add tooltip to Daily Docker Cleanup toggle
2 parents a6db83c + ebbc008 commit df9aa50

1 file changed

Lines changed: 38 additions & 2 deletions

File tree

apps/dokploy/components/dashboard/settings/servers/actions/toggle-docker-cleanup.tsx

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
import { toast } from "sonner";
21
import { Label } from "@/components/ui/label";
32
import { Switch } from "@/components/ui/switch";
3+
import {
4+
Tooltip,
5+
TooltipContent,
6+
TooltipProvider,
7+
TooltipTrigger,
8+
} from "@/components/ui/tooltip";
49
import { api } from "@/utils/api";
10+
import { HelpCircle } from "lucide-react";
11+
import { toast } from "sonner";
512

613
interface Props {
714
serverId?: string;
@@ -52,7 +59,36 @@ export const ToggleDockerCleanup = ({ serverId }: Props) => {
5259
return (
5360
<div className="flex items-center gap-4">
5461
<Switch checked={!!enabled} onCheckedChange={handleToggle} />
55-
<Label className="text-primary">Daily Docker Cleanup</Label>
62+
<TooltipProvider delayDuration={0}>
63+
<Tooltip>
64+
<TooltipTrigger asChild>
65+
<Label className="text-primary flex items-center gap-1.5 cursor-pointer">
66+
Daily Docker Cleanup
67+
<HelpCircle className="size-4 text-muted-foreground" />
68+
</Label>
69+
</TooltipTrigger>
70+
<TooltipContent side="top" className="max-w-sm">
71+
<p>
72+
Runs a full Docker cleanup daily, pruning stopped containers,
73+
unused images, volumes, build cache, and system resources. This
74+
may remove images built for Compose services that run on-demand
75+
(backup runners, cron jobs, one-off tasks).
76+
</p>
77+
<p className="mt-1">
78+
For custom cleanup strategies, use{" "}
79+
<a
80+
href="https://docs.dokploy.com/docs/core/schedule-jobs#example-1-automatic-docker-cleanup"
81+
target="_blank"
82+
rel="noopener noreferrer"
83+
className="underline text-primary"
84+
>
85+
Schedule Jobs
86+
</a>{" "}
87+
on your web server or remote servers.
88+
</p>
89+
</TooltipContent>
90+
</Tooltip>
91+
</TooltipProvider>
5692
</div>
5793
);
5894
};

0 commit comments

Comments
 (0)