From c41994879aff1d278520128df2016876ae952aaf Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Tue, 7 Nov 2023 22:36:07 +0800 Subject: [PATCH] refactor: add script install command --- src/client/pages/Servers.tsx | 42 +++++++++++++++++++++++++-- src/client/pages/Settings/Profile.tsx | 10 +++---- 2 files changed, 45 insertions(+), 7 deletions(-) diff --git a/src/client/pages/Servers.tsx b/src/client/pages/Servers.tsx index 7769d70..4fa46a8 100644 --- a/src/client/pages/Servers.tsx +++ b/src/client/pages/Servers.tsx @@ -9,6 +9,7 @@ import { Steps, Switch, Table, + Tabs, Tooltip, Typography, } from 'antd'; @@ -71,7 +72,20 @@ export const Servers: React.FC = React.memo(() => { onCancel={() => setIsModalOpen(false)} >
- + , + }, + { + key: 'manual', + label: 'Manual', + children: , + }, + ]} + />
@@ -218,6 +232,27 @@ export const ServerList: React.FC<{ }); ServerList.displayName = 'ServerList'; +export const InstallScript: React.FC = React.memo(() => { + const workspaceId = useCurrentWorkspaceId(); + const command = `curl -o- ${window.location.origin}/serverStatus/${workspaceId}/install.sh | bash`; + + return ( +
+
Run this command in your linux machine
+ + + {command} + +
+ ); +}); + export const AddServerStep: React.FC = React.memo(() => { const workspaceId = useCurrentWorkspaceId(); const [current, setCurrent] = useState(0); @@ -272,7 +307,10 @@ export const AddServerStep: React.FC = React.memo(() => { description: (
run reporter with:{' '} - + {command}