LiteSun commented on a change in pull request #891:
URL: https://github.com/apache/apisix-dashboard/pull/891#discussion_r531373213
##########
File path: web/src/pages/Route/components/Step1/RequestConfigView.tsx
##########
@@ -177,12 +177,81 @@ const RequestConfigView:
React.FC<RouteModule.Step1PassProps> = ({
</Form.List>
);
+ const RemoteAddrList = () => (
+ <Form.List name="remote_addrs">
+ {(fields, { add, remove }) => {
+ return (
+ <div>
+ {fields.map((field, index) => (
+ <Form.Item
+ {...(index === 0 ? FORM_ITEM_LAYOUT : FORM_ITEM_WITHOUT_LABEL)}
+ label={index === 0 ? formatMessage({ id:
'page.route.remoteAddrs' }) : ''}
+ key={field.key}
+ extra={
+ index === 0 ? (
+ <div>
+ {formatMessage({ id:
'page.route.form.itemExtraMessage1.remoteAddrs' })}
+ </div>
+ ) : null
+ }
+ >
+ <Form.Item
+ {...field}
+ validateTrigger={['onChange', 'onBlur']}
+ rules={[
+ {
+ pattern: new
RegExp(/^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$/, 'g'),
Review comment:
Regular expressions need to be updated and will be updated later.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]