From b7176fc8f37fd6e717be75c518407934a3340610 Mon Sep 17 00:00:00 2001 From: Arsfy Date: Sun, 27 Oct 2024 14:30:34 +0800 Subject: [PATCH] add copy linux install command --- beszel/site/src/components/add-system.tsx | 243 +++++++++++++++------- 1 file changed, 167 insertions(+), 76 deletions(-) diff --git a/beszel/site/src/components/add-system.tsx b/beszel/site/src/components/add-system.tsx index 85abeff..56cd2d0 100644 --- a/beszel/site/src/components/add-system.tsx +++ b/beszel/site/src/components/add-system.tsx @@ -9,6 +9,12 @@ import { DialogTrigger, } from '@/components/ui/dialog' import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '@/components/ui/tooltip' +import { + Tabs, + TabsContent, + TabsList, + TabsTrigger, +} from "@/components/ui/tabs" import { Input } from '@/components/ui/input' import { Label } from '@/components/ui/label' @@ -41,6 +47,10 @@ export function AddSystemButton({ className }: { className?: string }) { # FILESYSTEM: /dev/sda1 # override the root partition / device for disk I/O stats`) } + function copyInstallCommand(port: string) { + copyToClipboard(`curl -sL https://raw.githubusercontent.com/henrygd/beszel/main/supplemental/scripts/install-agent.sh -o install-agent.sh && chmod +x install-agent.sh && ./install-agent.sh -p ${port} -k "${publicKey}"`) + } + async function handleSubmit(e: SubmitEvent) { e.preventDefault() const formData = new FormData(e.target as HTMLFormElement) @@ -68,82 +78,163 @@ export function AddSystemButton({ className }: { className?: string }) { - - Add New System - - The agent must be running on the system to connect. Copy the{' '} - docker-compose.yml for the agent - below. - - -
-
-
- - -
-
- - -
-
- - -
-
- - -
- - - - - - -

Click to copy

-
-
-
-
-
- - - - -
+ + + Add New System + + Docker + Binary + + + + + The agent must be running on the system to connect. Copy the{' '} + docker-compose.yml for the agent + below. + +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + + + + + +

Click to copy

+
+
+
+
+
+ + + + +
+
+ + + The agent must be running on the system to connect. Copy the{' '} + install command for the agent below. + +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + + + + + +

Click to copy

+
+
+
+
+
+ + + + +
+
+
- + ) }