fix: add pool not work
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import HighlightCode from '@/components/highlight-code';
|
||||
import { addWorkerGuide } from '@/pages/resources/config';
|
||||
import React from 'react';
|
||||
|
||||
type ViewModalProps = {
|
||||
registrationInfo: {
|
||||
token: string;
|
||||
image: string;
|
||||
server_url: string;
|
||||
};
|
||||
};
|
||||
|
||||
const AddWorkerCommand: React.FC<ViewModalProps> = ({ registrationInfo }) => {
|
||||
const code = React.useMemo(() => {
|
||||
const commandCode = addWorkerGuide['cuda'];
|
||||
return commandCode?.registerWorker({
|
||||
server: registrationInfo.server_url || origin,
|
||||
tag: '',
|
||||
image: registrationInfo.image,
|
||||
token: registrationInfo.token || '${token}',
|
||||
workerip: '${workerip}'
|
||||
});
|
||||
}, [registrationInfo]);
|
||||
|
||||
return (
|
||||
<HighlightCode
|
||||
theme="dark"
|
||||
code={code.replace(/\\/g, '')}
|
||||
copyValue={code}
|
||||
lang="bash"
|
||||
></HighlightCode>
|
||||
);
|
||||
};
|
||||
|
||||
export default AddWorkerCommand;
|
||||
Reference in New Issue
Block a user