-
Notifications
You must be signed in to change notification settings - Fork 550
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: Added fault-injection plugin form #1740
Conversation
Deploy preview for apisix-dashboard ready! Built with commit 9fc1848 |
Codecov Report
@@ Coverage Diff @@
## master #1740 +/- ##
==========================================
+ Coverage 62.55% 71.51% +8.96%
==========================================
Files 123 47 -76
Lines 5253 3128 -2125
Branches 649 0 -649
==========================================
- Hits 3286 2237 -1049
+ Misses 1779 647 -1132
- Partials 188 244 +56
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
add(); | ||
}} | ||
> | ||
<PlusOutlined /> {formatMessage({ id: 'component.global.create' })} |
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.
It would be better to
<PlusOutlined /> {formatMessage({ id: 'component.global.create' })} | |
<PlusOutlined /> `$({formatMessage({ id: 'component.global.create' })}) abort.vars` |
add(); | ||
}} | ||
> | ||
<PlusOutlined /> {formatMessage({ id: 'component.global.create' })} |
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.
<PlusOutlined /> {formatMessage({ id: 'component.global.create' })} | |
<PlusOutlined /> `${{formatMessage({ id: 'component.global.create' })}} delay.vars` |
noStyle | ||
> | ||
<Select style={{ width: '70%' }}> | ||
{['==', '`~=', '>', '<', '~~', '~*', 'in', 'has', '!'].map((item) => { |
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.
It would be better to define a global constant, it would be reuse both here and route vars
<Form.Item | ||
name={['abort', 'http_status']} | ||
label='abort.http_status' | ||
required |
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.
required | |
rules={[{ required: true, message: 'Please input abort.http_status!' }]} |
<Form.Item | ||
label="delay.duration" | ||
name={['delay', 'duration']} | ||
required |
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.
required | |
rules={[{ required: true, message: 'Please input delay.duration!' }]} |
@@ -59,7 +59,7 @@ const FaultInjection: React.FC<Props> = ({ form }) => { | |||
<Form.Item | |||
name={['abort', 'http_status']} | |||
label='abort.http_status' | |||
required | |||
rules={[{ required: true, message: 'Please input abort.http_status!' }]} |
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.
add i18n please
<Input min={200} /> | ||
</Form.Item> | ||
|
||
<Form.List name={['abort', 'vars']}> |
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.
We need to convert the var to the following: "vars": [ [ [ "arg_name","==","jack" ] ] ]
Hello, do we still need this change? |
Perhaps not. |
Please answer these questions before submitting a pull request, or your PR will get closed.
Why submit this pull request?

added fault-injection plugin form
What changes will this PR take into?
Please update this section with detailed description.
Related issues
fix/resolve #1
Checklist: