mirror of
https://github.com/dokploy/dokploy.git
synced 2026-06-14 03:19:49 +00:00
31 lines
802 B
TypeScript
31 lines
802 B
TypeScript
import { useState } from "react";
|
|
import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog";
|
|
import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
|
|
import { ShowNodes } from "./show-nodes";
|
|
|
|
interface Props {
|
|
serverId: string;
|
|
}
|
|
|
|
export const ShowNodesModal = ({ serverId }: Props) => {
|
|
const [isOpen, setIsOpen] = useState(false);
|
|
|
|
return (
|
|
<Dialog open={isOpen} onOpenChange={setIsOpen}>
|
|
<DialogTrigger asChild>
|
|
<DropdownMenuItem
|
|
className="w-full cursor-pointer "
|
|
onSelect={(e) => e.preventDefault()}
|
|
>
|
|
Show Swarm Nodes
|
|
</DropdownMenuItem>
|
|
</DialogTrigger>
|
|
<DialogContent className="min-w-[70vw]">
|
|
<div className="grid w-full gap-1">
|
|
<ShowNodes serverId={serverId} />
|
|
</div>
|
|
</DialogContent>
|
|
</Dialog>
|
|
);
|
|
};
|