chore: test by api
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import ListInput from '@/components/list-input';
|
||||
import SealInput from '@/components/seal-form/seal-input';
|
||||
import SealSelect from '@/components/seal-form/seal-select';
|
||||
import { PageAction } from '@/config';
|
||||
import { PageActionType } from '@/config/types';
|
||||
import useAppUtils from '@/hooks/use-app-utils';
|
||||
import { useIntl } from '@umijs/max';
|
||||
@@ -28,43 +27,23 @@ const BasicForm: React.FC<AddModalProps> = ({ action }) => {
|
||||
]}
|
||||
>
|
||||
<SealInput.Input
|
||||
trim
|
||||
disabled={action === PageAction.EDIT}
|
||||
label={intl.formatMessage({ id: 'common.table.name' })}
|
||||
required
|
||||
></SealInput.Input>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item<FormData>
|
||||
name="compatibility_type"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: getRuleMessage('select', 'template', false)
|
||||
}
|
||||
]}
|
||||
>
|
||||
<SealSelect
|
||||
label={'Compatibility Template'}
|
||||
required
|
||||
options={[
|
||||
{ label: 'Template 1', value: 'tensorflow' },
|
||||
{ label: 'Template 2', value: 'torchserve' }
|
||||
]}
|
||||
></SealSelect>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item<FormData>
|
||||
name="allowed_proxy_uris"
|
||||
name="health_check_path"
|
||||
rules={[{ required: false }]}
|
||||
>
|
||||
<ListInput
|
||||
dataList={form.getFieldValue('allowed_proxy_uris') || []}
|
||||
onChange={(data: string[]) => {
|
||||
form.setFieldValue('allowed_proxy_uris', data);
|
||||
}}
|
||||
btnText={'Add Allowed Proxy URI'}
|
||||
label={'Proxy URI'}
|
||||
></ListInput>
|
||||
<SealInput.Input trim label={'Health Check Path'}></SealInput.Input>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item name="default_run_command">
|
||||
<SealInput.TextArea label="Default Execution Command"></SealInput.TextArea>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item<FormData> name="description" rules={[{ required: false }]}>
|
||||
<SealInput.TextArea
|
||||
label={intl.formatMessage({ id: 'common.table.description' })}
|
||||
|
||||
Reference in New Issue
Block a user