-
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: Basic plugin UI From #1714
Conversation
fine, due to this PR will get larger, @LiteSun Please resolve this one first. For other plugins, please send new PRs. |
ref?: any; | ||
}; | ||
|
||
const BasicAuth: React.FC<Props> = forwardRef( |
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.
Why we need forwardRef
?
default: | ||
return <></> | ||
} | ||
} |
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.
note here
case 'api-breaker': | ||
return <ApiBreaker form={form} /> | ||
default: | ||
return <></> |
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.
return <></> | |
return null |
|
||
export const PLUGIN_UI_LIST = ['basic-auth', 'limit-conn', 'referer-restriction', 'proxy-mirror', 'api-breaker']; | ||
|
||
export const PLUGIN_UI_FORM: React.FC<Props> = ({ name, form }) => { |
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.
export const PLUGIN_UI_FORM: React.FC<Props> = ({ name, form }) => { | |
export const PluginForm: React.FC<Props> = ({ name, form }) => { |
form: FormInstance | ||
} | ||
|
||
export const PLUGIN_UI_LIST = ['basic-auth', 'limit-conn', 'referer-restriction', 'proxy-mirror', 'api-breaker']; |
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.
export const PLUGIN_UI_LIST = ['basic-auth', 'limit-conn', 'referer-restriction', 'proxy-mirror', 'api-breaker']; | |
export const PLUGIN_LIST = ['basic-auth', 'limit-conn', 'referer-restriction', 'proxy-mirror', 'api-breaker']; |
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.
PLUGIN_UI_LIST
variable names are more intuitive imo 🤔
OK |
One PR only does one feature |
ok |
Codecov Report
@@ Coverage Diff @@
## master #1714 +/- ##
==========================================
- Coverage 72.08% 71.52% -0.56%
==========================================
Files 130 47 -83
Lines 5649 3126 -2523
Branches 648 0 -648
==========================================
- Hits 4072 2236 -1836
+ Misses 1333 647 -686
+ Partials 244 243 -1
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
This pr is too big and difficult to review, I'll break it down into smaller pr. Thanks for the reviewers. |
Please answer these questions before submitting a pull request, or your PR will get closed.
Why submit this pull request?
What changes will this PR take into?
Configuring the UI Form for popular plugins
Please update this section with detailed description.
Checklist: