diff --git a/apps/dokploy/components/dashboard/docker/show/columns.tsx b/apps/dokploy/components/dashboard/docker/show/columns.tsx index fa06f4d70..4b108344e 100644 --- a/apps/dokploy/components/dashboard/docker/show/columns.tsx +++ b/apps/dokploy/components/dashboard/docker/show/columns.tsx @@ -1,10 +1,13 @@ import type { ColumnDef } from "@tanstack/react-table"; +import copy from "copy-to-clipboard"; import { ArrowUpDown, MoreHorizontal } from "lucide-react"; +import { toast } from "sonner"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { DropdownMenu, DropdownMenuContent, + DropdownMenuItem, DropdownMenuLabel, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; @@ -37,6 +40,7 @@ export const columns: ColumnDef[] = [ }, { accessorKey: "state", + filterFn: "equals", header: ({ column }) => { return ( + ); + }, + cell: ({ row }) => { + const value = row.getValue("ports") as string; + return ( +
+ {value} +
+ ); + }, + }, { id: "actions", enableHiding: false, @@ -115,6 +141,14 @@ export const columns: ColumnDef[] = [ Actions + { + copy(container.containerId); + toast.success("Container ID copied to clipboard"); + }} + > + Copy Container ID + { - const { data, isPending } = api.docker.getContainers.useQuery({ - serverId, - }); + const { data, isPending, refetch, isRefetching } = + api.docker.getContainers.useQuery( + { + serverId, + }, + { + refetchInterval: 10_000, + }, + ); const [sorting, setSorting] = React.useState([]); const [columnFilters, setColumnFilters] = React.useState( @@ -106,12 +129,48 @@ export const ShowContainers = ({ serverId }: Props) => { } className="md:max-w-sm" /> + + -