You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/11/27 05:51:43 UTC

[GitHub] [apisix-dashboard] liuxiran commented on a change in pull request #891: feat: add remote_addrs in route step1 page

liuxiran commented on a change in pull request #891:
URL: https://github.com/apache/apisix-dashboard/pull/891#discussion_r531393436



##########
File path: web/src/pages/Route/locales/en-US.ts
##########
@@ -63,6 +63,10 @@ export default {
     '1. Request path, for example: /foo/index.html, supports request path prefix /foo/* ;',
   'page.route.form.itemExtraMessage2.path': '2. /* represents all paths',
   'page.route.form.itemRulesPatternMessage.path': 'Begin with / , and * can only at the end',
+  'page.route.form.itemRulesPatternMessage.remoteAddrs':
+    'Please enter a valid IP address, for examble: 192.168.1.101, 192.168.1.0/24, ::1, fe80::1, fe80::1/64',

Review comment:
       `examble` -> `example`

##########
File path: web/src/pages/Route/components/Step1/RequestConfigView.tsx
##########
@@ -177,12 +177,84 @@ 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' }) : ''}

Review comment:
       ```js
   index === 0 && formatMessage({ id: 'page.route.remoteAddrs' }) 
   ```
   would be better  :)

##########
File path: web/src/pages/Route/locales/en-US.ts
##########
@@ -63,6 +63,10 @@ export default {
     '1. Request path, for example: /foo/index.html, supports request path prefix /foo/* ;',
   'page.route.form.itemExtraMessage2.path': '2. /* represents all paths',
   'page.route.form.itemRulesPatternMessage.path': 'Begin with / , and * can only at the end',
+  'page.route.form.itemRulesPatternMessage.remoteAddrs':
+    'Please enter a valid IP address, for examble: 192.168.1.101, 192.168.1.0/24, ::1, fe80::1, fe80::1/64',
+  'page.route.form.itemExtraMessage1.remoteAddrs':
+    'Client IP, for examble: 192.168.1.101, 192.168.1.0/24, ::1, fe80::1, fe80::1/64',

Review comment:
       Ditto.




----------------------------------------------------------------
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:
users@infra.apache.org