feat: worker maintenance

This commit is contained in:
jialin
2025-11-13 21:00:35 +08:00
parent 98e6c71bf8
commit 864cf76c07
14 changed files with 264 additions and 79 deletions
@@ -4,6 +4,7 @@ import React from 'react';
type ViewModalProps = {
currentGPU?: string;
workerIP?: string;
registrationInfo: {
token: string;
image: string;
@@ -13,6 +14,7 @@ type ViewModalProps = {
const AddWorkerCommand: React.FC<ViewModalProps> = ({
registrationInfo,
workerIP,
currentGPU
}) => {
const code = React.useMemo(() => {
@@ -21,10 +23,11 @@ const AddWorkerCommand: React.FC<ViewModalProps> = ({
gpu: currentGPU || '',
server: registrationInfo.server_url || origin,
tag: '',
workerIP: '${WORKER_IP}',
image: registrationInfo.image,
token: registrationInfo.token || '${token}'
});
}, [registrationInfo, currentGPU]);
}, [registrationInfo, currentGPU, workerIP]);
return (
<HighlightCode
@@ -89,7 +89,6 @@ const AddWorkerStep: React.FC<AddModalProps> = ({
const [currentGPU, setCurrentGPU] = React.useState<string>(
GPUDriverMap.NVIDIA
);
React.useState<string>(GPUDriverMap.NVIDIA);
const [workerCommand, setWorkerCommand] = React.useState<Record<string, any>>(
{
label: 'NVIDIA',