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 04:03:35 UTC
[GitHub] [apisix-dashboard] LiteSun opened a new pull request #891: feat: add remote_addrs in route step1 page
LiteSun opened a new pull request #891:
URL: https://github.com/apache/apisix-dashboard/pull/891
Please answer these questions before submitting a pull request
- Why submit this pull request?
- [ ] Bugfix
- [x] New feature provided
- [ ] Improve performance
- Related issues
resolves #855
___
### Bugfix
- Description
- How to fix?
___
### New feature or improvement
- Describe the details and related test reports.
----------------------------------------------------------------
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
[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #891: feat: add remote_addrs in route step1 page
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #891:
URL: https://github.com/apache/apisix-dashboard/pull/891#issuecomment-734633942
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/891?src=pr&el=h1) Report
> Merging [#891](https://codecov.io/gh/apache/apisix-dashboard/pull/891?src=pr&el=desc) (858fe65) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/14a12d331f71796313085652cc277ec12b0191d5?el=desc) (14a12d3) will **not change** coverage.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/891/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/891?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #891 +/- ##
=======================================
Coverage 43.03% 43.03%
=======================================
Files 18 18
Lines 1271 1271
=======================================
Hits 547 547
Misses 632 632
Partials 92 92
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/891?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/891?src=pr&el=footer). Last update [14a12d3...858fe65](https://codecov.io/gh/apache/apisix-dashboard/pull/891?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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
[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #891: feat: add remote_addrs in route step1 page
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #891:
URL: https://github.com/apache/apisix-dashboard/pull/891#issuecomment-734633942
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/891?src=pr&el=h1) Report
> Merging [#891](https://codecov.io/gh/apache/apisix-dashboard/pull/891?src=pr&el=desc) (6d95c9d) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/14a12d331f71796313085652cc277ec12b0191d5?el=desc) (14a12d3) will **not change** coverage.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/891/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/891?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #891 +/- ##
=======================================
Coverage 43.03% 43.03%
=======================================
Files 18 18
Lines 1271 1271
=======================================
Hits 547 547
Misses 632 632
Partials 92 92
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/891?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/891?src=pr&el=footer). Last update [14a12d3...6d95c9d](https://codecov.io/gh/apache/apisix-dashboard/pull/891?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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
[GitHub] [apisix-dashboard] LiteSun merged pull request #891: feat: add remote_addrs in route step1 page
Posted by GitBox <gi...@apache.org>.
LiteSun merged pull request #891:
URL: https://github.com/apache/apisix-dashboard/pull/891
----------------------------------------------------------------
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
[GitHub] [apisix-dashboard] LiteSun commented on a change in pull request #891: feat: add remote_addrs in route step1 page
Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-io commented on pull request #891: feat: add remote_addrs in route step1 page
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #891:
URL: https://github.com/apache/apisix-dashboard/pull/891#issuecomment-734633942
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/891?src=pr&el=h1) Report
> Merging [#891](https://codecov.io/gh/apache/apisix-dashboard/pull/891?src=pr&el=desc) (dec729b) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/14a12d331f71796313085652cc277ec12b0191d5?el=desc) (14a12d3) will **not change** coverage.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/891/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/891?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #891 +/- ##
=======================================
Coverage 43.03% 43.03%
=======================================
Files 18 18
Lines 1271 1271
=======================================
Hits 547 547
Misses 632 632
Partials 92 92
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/891?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/891?src=pr&el=footer). Last update [14a12d3...dec729b](https://codecov.io/gh/apache/apisix-dashboard/pull/891?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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
[GitHub] [apisix-dashboard] liuxiran commented on a change in pull request #891: feat: add remote_addrs in route step1 page
Posted by GitBox <gi...@apache.org>.
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