-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(): add tenant backup destType #628
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,8 +29,11 @@ export default function NewBackup() { | |
const scheduleValue = Form.useWatch(['scheduleDates'], form); | ||
|
||
const distType = [ | ||
{ label: 'OSS', value: 'OSS' }, | ||
{ label: 'NFS', value: 'NFS' }, | ||
{ label: 'OSS', value: 'OSS' }, | ||
{ label: 'COS', value: 'COS' }, | ||
{ label: 'S3', value: 'S3' }, | ||
{ label: 'S3-Compatible', value: 'S3-Compatible' }, | ||
]; | ||
|
||
const handleSubmit = async (values: API.NewBackupForm) => { | ||
|
@@ -250,6 +253,61 @@ export default function NewBackup() { | |
/> | ||
</Form.Item> | ||
</Col> | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Input form field There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mean that a new field named |
||
<Form.Item noStyle dependencies={['destType']}> | ||
{({ getFieldValue }) => { | ||
if (getFieldValue(['destType']) === 'COS') { | ||
return ( | ||
<Col span={8}> | ||
<Form.Item | ||
label="AppID" | ||
name={['appID']} | ||
rules={[ | ||
{ | ||
required: true, | ||
message: '请输入AppID', | ||
}, | ||
]} | ||
> | ||
<Password | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Plain text is more proper. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. DONE |
||
placeholder={intl.formatMessage({ | ||
id: 'Dashboard.Detail.NewBackup.PleaseEnter', | ||
defaultMessage: '请输入', | ||
})} | ||
/> | ||
</Form.Item> | ||
</Col> | ||
); | ||
} | ||
}} | ||
</Form.Item> | ||
<Form.Item noStyle dependencies={['destType']}> | ||
{({ getFieldValue }) => { | ||
if (getFieldValue(['destType']) === 'S3') { | ||
return ( | ||
<Col span={8}> | ||
<Form.Item | ||
label="Region" | ||
name={['Region']} | ||
rules={[ | ||
{ | ||
required: true, | ||
message: '请输入 Region', | ||
}, | ||
]} | ||
> | ||
<Password | ||
placeholder={intl.formatMessage({ | ||
id: 'Dashboard.Detail.NewBackup.PleaseEnter', | ||
defaultMessage: '请输入', | ||
})} | ||
/> | ||
</Form.Item> | ||
</Col> | ||
); | ||
} | ||
}} | ||
</Form.Item> | ||
</Row> | ||
</Col> | ||
<Col span={12}> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be a typo. Maybe
destTypes
is better.