diff --git a/web/src/pages/nodes/wizard/Step2DeployOptions.tsx b/web/src/pages/nodes/wizard/Step2DeployOptions.tsx new file mode 100644 index 0000000..aaf5952 --- /dev/null +++ b/web/src/pages/nodes/wizard/Step2DeployOptions.tsx @@ -0,0 +1,90 @@ +import React from 'react' +import { Form, Radio, Select, Typography } from '@arco-design/web-react' +import type { InstallMode, InstallArch, InstallSource } from '../../../types/nodes' + +const { Text } = Typography + +export interface DeployOptions { + mode: InstallMode + arch: InstallArch + agentVersion: string + downloadSrc: InstallSource + ttlSeconds: number +} + +interface Props { + masterVersion: string + value: DeployOptions + onChange: (v: DeployOptions) => void +} + +export function Step2DeployOptions({ masterVersion, value, onChange }: Props) { + const update = (patch: Partial) => onChange({ ...value, ...patch }) + + return ( +
+ + update({ mode: v as InstallMode })} + options={[ + { label: 'systemd(推荐)', value: 'systemd' }, + { label: 'Docker', value: 'docker' }, + { label: '前台运行(调试)', value: 'foreground' }, + ]} + /> + + + + update({ agentVersion: v })} + options={[ + { label: `${masterVersion}(跟随 Master,推荐)`, value: masterVersion }, + ]} + /> + + + +