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 2021/04/09 09:39:25 UTC

[GitHub] [apisix-dashboard] LiteSun opened a new pull request #1727: feat: add referer-restriction plugin form

LiteSun opened a new pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727


   Please answer these questions before submitting a pull request, **or your PR will get closed**.
   
   **Why submit this pull request?**
   
   - [ ] Bugfix
   - [x] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   
   **What changes will this PR take into?**
   
   Please update this section with detailed description.
   
   **Related issues**
   
   **Checklist:**
   
   - [ ] Did you explain what problem does this PR solve? Or what new features have been added?
   - [ ] Have you added corresponding test cases?
   - [ ] Have you modified the corresponding document?
   - [ ] Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first
   


-- 
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] juzhiyuan edited a comment on pull request #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
juzhiyuan edited a comment on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-817683500


   ![image](https://user-images.githubusercontent.com/2106987/114379049-ed285d80-9bba-11eb-921a-076e0d4b0161.png)
   
   @LiteSun failed when building


-- 
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] netlify[bot] edited a comment on pull request #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-817649660


   Deploy preview for *apisix-dashboard* processing.
   
   Building with commit 308d4d67b97deff5c348599cc73ebf00dbca9d3a
   
   https://app.netlify.com/sites/apisix-dashboard/deploys/60750348bb2dce0007af9a2f


-- 
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 edited a comment on pull request #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
LiteSun edited a comment on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-816578427


   > Can you provide a screenshot of the effect?
   
   sure. 
   


-- 
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] netlify[bot] edited a comment on pull request #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-817649660


   Deploy preview for *apisix-dashboard* ready!
   
   Built with commit d0d70a6806731d70721a8f6893a50607ad3918c8
   
   https://deploy-preview-1727--apisix-dashboard.netlify.app


-- 
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] netlify[bot] edited a comment on pull request #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-817649660


   Deploy preview for *apisix-dashboard* ready!
   
   Built with commit 48d2ed4ce218bba9623e4e41a6c2148120f494dc
   
   https://deploy-preview-1727--apisix-dashboard.netlify.app


-- 
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] netlify[bot] edited a comment on pull request #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-817649660


   Deploy preview for *apisix-dashboard* processing.
   
   Building with commit ec04dbd3765ed8f4a1ade46b71a36b54f3338f29
   
   https://app.netlify.com/sites/apisix-dashboard/deploys/6076524a885f12000805f67d


-- 
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] netlify[bot] edited a comment on pull request #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-817649660


   Deploy preview for *apisix-dashboard* ready!
   
   Built with commit ec04dbd3765ed8f4a1ade46b71a36b54f3338f29
   
   https://deploy-preview-1727--apisix-dashboard.netlify.app


-- 
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 #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-817269980


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1727](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0cbfd22) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/fb758091ddcbb445f6b529b3f26defbeddddab91?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fb75809) will **decrease** coverage by `0.01%`.
   > The diff coverage is `72.22%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1727      +/-   ##
   ==========================================
   - Coverage   72.87%   72.86%   -0.02%     
   ==========================================
     Files         117      118       +1     
     Lines        2776     2793      +17     
     Branches      670      673       +3     
   ==========================================
   + Hits         2023     2035      +12     
   - Misses        753      758       +5     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | frontend-e2e-test | `72.86% <72.22%> (-0.02%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...b/src/components/Plugin/UI/referer-restriction.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9VSS9yZWZlcmVyLXJlc3RyaWN0aW9uLnRzeA==) | `66.66% <66.66%> (ø)` | |
   | [web/src/components/Plugin/UI/plugin.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9VSS9wbHVnaW4udHN4) | `80.95% <100.00%> (+2.00%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [fb75809...0cbfd22](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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 #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-817269980


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1727](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d0d70a6) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/1fa467a3ffc627e37cc7057b6c1887eb4eba2c31?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1fa467a) will **increase** coverage by `0.03%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head d0d70a6 differs from pull request most recent head 308d4d6. Consider uploading reports for the commit 308d4d6 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1727      +/-   ##
   ==========================================
   + Coverage   71.35%   71.38%   +0.03%     
   ==========================================
     Files          47       47              
     Lines        3128     3128              
   ==========================================
   + Hits         2232     2233       +1     
   + Misses        656      652       -4     
   - Partials      240      243       +3     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `62.14% <ø> (+0.03%)` | :arrow_up: |
   | backend-e2e-test-ginkgo | `48.91% <ø> (-0.07%)` | :arrow_down: |
   | backend-unit-test | `52.29% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `86.74% <0.00%> (-1.21%)` | :arrow_down: |
   | [api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==) | `33.33% <0.00%> (ø)` | |
   | [api/cmd/managerapi.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2NtZC9tYW5hZ2VyYXBpLmdv) | `58.10% <0.00%> (+4.05%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1fa467a...308d4d6](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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 #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-817269980


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=h1) Report
   > Merging [#1727](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=desc) (d6e2eec) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/8b6080d2fc87bb5936650a647b67e1480745721a?el=desc) (8b6080d) will **decrease** coverage by `19.57%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #1727       +/-   ##
   ===========================================
   - Coverage   71.86%   52.29%   -19.58%     
   ===========================================
     Files          47       38        -9     
     Lines        3128     2660      -468     
   ===========================================
   - Hits         2248     1391      -857     
   - Misses        638     1081      +443     
   + Partials      242      188       -54     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `52.29% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3ZlcnNpb24uZ28=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `0.00% <0.00%> (-74.77%)` | :arrow_down: |
   | [api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
   | [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `0.00% <0.00%> (-55.47%)` | :arrow_down: |
   | [api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv) | `27.41% <0.00%> (-37.50%)` | :arrow_down: |
   | [api/internal/handler/handler.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGFuZGxlci5nbw==) | `42.59% <0.00%> (-35.19%)` | :arrow_down: |
   | [api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2NoZW1hL3NjaGVtYS5nbw==) | `66.66% <0.00%> (-33.34%)` | :arrow_down: |
   | ... and [33 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?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/1727?src=pr&el=footer). Last update [8b6080d...d6e2eec](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?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 #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-817269980


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1727](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d0d70a6) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/1fa467a3ffc627e37cc7057b6c1887eb4eba2c31?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1fa467a) will **decrease** coverage by `19.06%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head d0d70a6 differs from pull request most recent head 308d4d6. Consider uploading reports for the commit 308d4d6 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #1727       +/-   ##
   ===========================================
   - Coverage   71.35%   52.29%   -19.07%     
   ===========================================
     Files          47       38        -9     
     Lines        3128     2660      -468     
   ===========================================
   - Hits         2232     1391      -841     
   - Misses        656     1081      +425     
   + Partials      240      188       -52     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `52.29% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL3ZlcnNpb24uZ28=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `0.00% <0.00%> (-71.03%)` | :arrow_down: |
   | [api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
   | [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `0.00% <0.00%> (-55.47%)` | :arrow_down: |
   | [api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv) | `27.41% <0.00%> (-37.50%)` | :arrow_down: |
   | [api/internal/handler/handler.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGFuZGxlci5nbw==) | `42.59% <0.00%> (-35.19%)` | :arrow_down: |
   | [api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2NoZW1hL3NjaGVtYS5nbw==) | `66.66% <0.00%> (-33.34%)` | :arrow_down: |
   | ... and [33 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1fa467a...308d4d6](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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] netlify[bot] edited a comment on pull request #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-817649660


   Deploy preview for *apisix-dashboard* processing.
   
   Building with commit 48d2ed4ce218bba9623e4e41a6c2148120f494dc
   
   https://app.netlify.com/sites/apisix-dashboard/deploys/60778c8d99523100073b0d4d


-- 
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] netlify[bot] edited a comment on pull request #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-817649660


   Deploy preview for *apisix-dashboard* processing.
   
   Building with commit d0d70a6806731d70721a8f6893a50607ad3918c8
   
   https://app.netlify.com/sites/apisix-dashboard/deploys/6074f80fa58b7f00071efa7a


-- 
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] netlify[bot] edited a comment on pull request #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-817649660


   Deploy preview for *apisix-dashboard* processing.
   
   Building with commit 0cbfd22eb58872c63d2ab242933af2fcba73f058
   
   https://app.netlify.com/sites/apisix-dashboard/deploys/6077911d5a615a0007b57570


-- 
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] netlify[bot] edited a comment on pull request #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-817649660


   Deploy preview for *apisix-dashboard* ready!
   
   Built with commit 308d4d67b97deff5c348599cc73ebf00dbca9d3a
   
   https://deploy-preview-1727--apisix-dashboard.netlify.app


-- 
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 #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-817269980


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=h1) Report
   > Merging [#1727](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=desc) (d6e2eec) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/8b6080d2fc87bb5936650a647b67e1480745721a?el=desc) (8b6080d) will **decrease** coverage by `0.44%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1727      +/-   ##
   ==========================================
   - Coverage   71.86%   71.41%   -0.45%     
   ==========================================
     Files          47       47              
     Lines        3128     3128              
   ==========================================
   - Hits         2248     2234      -14     
   - Misses        638      650      +12     
   - Partials      242      244       +2     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `62.18% <ø> (-0.55%)` | :arrow_down: |
   | backend-e2e-test-ginkgo | `49.16% <ø> (+0.06%)` | :arrow_up: |
   | backend-unit-test | `52.29% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/core/storage/etcd.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmFnZS9ldGNkLmdv) | `43.63% <0.00%> (-7.28%)` | :arrow_down: |
   | [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `71.02% <0.00%> (-3.74%)` | :arrow_down: |
   | [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `87.95% <0.00%> (-1.21%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?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/1727?src=pr&el=footer). Last update [8b6080d...d6e2eec](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?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] membphis commented on pull request #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
membphis commented on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-816578082


   Can you provide a screenshot of the effect?


-- 
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] juzhiyuan commented on pull request #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-817683500


   ![image](https://user-images.githubusercontent.com/2106987/114379049-ed285d80-9bba-11eb-921a-076e0d4b0161.png)
   
   @LiteSun Your new changes failed when building


-- 
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] juzhiyuan commented on a change in pull request #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#discussion_r613134663



##########
File path: web/cypress/support/commands.js
##########
@@ -66,6 +66,18 @@ Cypress.Commands.add('configurePlugins', (cases) => {
 
         // NOTE: wait for the Drawer to appear on the DOM
         cy.focused(domSelector.drawer).should('exist');
+
+        cy.get(domSelector.codeMirrorMode).invoke('text').then(text => {
+          if (text === 'Form') {
+            // FIXME: https://github.com/cypress-io/cypress/issues/7306

Review comment:
       Do we have issue for this?




-- 
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] netlify[bot] commented on pull request #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
netlify[bot] commented on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-817649660


   Deploy preview for *apisix-dashboard* processing.
   
   Building with commit 143929681fe6e7e51cc95043315b5d65a327431c
   
   https://app.netlify.com/sites/apisix-dashboard/deploys/6074130134f2df000707ac41


-- 
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 edited a comment on pull request #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
LiteSun edited a comment on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-816578427


   > Can you provide a screenshot of the effect?
   
   sure. 
   ![image](https://user-images.githubusercontent.com/31329157/114165719-6f1c4a80-995f-11eb-8844-fa4d83102f4e.png)
   


-- 
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 #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
LiteSun merged pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727


   


-- 
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] jbampton commented on a change in pull request #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
jbampton commented on a change in pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#discussion_r610546108



##########
File path: web/src/components/Plugin/UI/referer-restriction.tsx
##########
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import React from 'react';
+import type { FormInstance } from 'antd/es/form';
+import { Form, Input, Button, Switch } from 'antd';
+import { useIntl } from 'umi';
+import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons';
+
+type Props = {
+  form: FormInstance;
+};
+
+const FORM_ITEM_LAYOUT = {
+  labelCol: {
+    span: 5,
+  },
+  wrapperCol: {
+    span: 8
+  },
+};
+
+const FORM_ITEM_WITHOUT_LABEL = {
+  wrapperCol: {
+    span: 8, offset: 5
+  },
+};
+
+const RefererRestriction: React.FC<Props> = ({ form }) => {
+  const { formatMessage } = useIntl()
+  return (
+    <Form
+      form={form}
+      {...FORM_ITEM_LAYOUT}
+      initialValues={{ whitelist: [''] }}
+    >
+      <Form.List name="whitelist" >
+        {(fields, { add, remove }) => {
+          return (
+            <div>
+              {fields.map((field, index) => (
+                <Form.Item
+                  {...(index === 0 ? FORM_ITEM_LAYOUT : FORM_ITEM_WITHOUT_LABEL)}
+                  label={index === 0 && 'whitelist'}
+                  key={field.key}
+                  required
+                  tooltip='List of hostname to whitelist. The hostname can be started with * as a wildcard.'
+                >
+                  <Form.Item
+                    {...field}
+                    validateTrigger={['onChange', 'onBlur']}
+                    required
+                    noStyle
+                  >
+                    <Input />
+                  </Form.Item>
+                  {fields.length > 1 ? (
+                    <MinusCircleOutlined
+                      className="dynamic-delete-button"
+                      onClick={() => {
+                        remove(field.name);
+                      }}
+                    />
+                  ) : null}
+                </Form.Item>
+              ))}
+              {
+                <Form.Item {...FORM_ITEM_WITHOUT_LABEL}>
+                  <Button
+                    type="dashed"
+                    data-cy="addHost"
+                    onClick={() => {
+                      add();
+                    }}
+                  >
+                    <PlusOutlined /> {formatMessage({ id: 'component.global.create' })}
+                  </Button>
+                </Form.Item>
+              }
+            </div>
+          );
+        }}
+      </Form.List>
+      <Form.Item
+        label="bypass_missing"
+        name="bypass_missing"
+        valuePropName="checked"
+        tooltip='Whether to bypass the check when the Referer header is missing or malformed.'
+      >
+        <Switch />
+      </Form.Item>
+    </Form>
+  );
+}
+
+export default RefererRestriction;

Review comment:
       ```suggestion
   export default RefererRestriction;
   
   ```

##########
File path: web/cypress/support/commands.js
##########
@@ -66,6 +66,16 @@ Cypress.Commands.add('configurePlugins', (cases) => {
 
         // NOTE: wait for the Drawer to appear on the DOM
         cy.focused(domSelector.drawer).should('exist');
+
+        cy.get(domSelector.codeMirrorMode).invoke('text').then(text => {
+          if (text === 'Form') {
+            cy.get(domSelector.codeMirrorMode).should('exist');
+            cy.get(domSelector.codeMirrorMode).click();
+            cy.get(domSelector.selectDropdown).should('be.visible');
+            cy.get(domSelector.selectJSON).click();
+          }
+        });
+        

Review comment:
       ```suggestion
   
   ```




-- 
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 #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
LiteSun commented on a change in pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#discussion_r610986109



##########
File path: web/src/components/Plugin/UI/referer-restriction.tsx
##########
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import React from 'react';
+import type { FormInstance } from 'antd/es/form';
+import { Form, Input, Button, Switch } from 'antd';
+import { useIntl } from 'umi';
+import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons';
+
+type Props = {
+  form: FormInstance;
+};
+
+const FORM_ITEM_LAYOUT = {
+  labelCol: {
+    span: 5,
+  },
+  wrapperCol: {
+    span: 8
+  },
+};
+
+const FORM_ITEM_WITHOUT_LABEL = {
+  wrapperCol: {
+    span: 8, offset: 5
+  },
+};
+
+const RefererRestriction: React.FC<Props> = ({ form }) => {
+  const { formatMessage } = useIntl()
+  return (
+    <Form
+      form={form}
+      {...FORM_ITEM_LAYOUT}
+      initialValues={{ whitelist: [''] }}
+    >
+      <Form.List name="whitelist" >
+        {(fields, { add, remove }) => {
+          return (
+            <div>
+              {fields.map((field, index) => (
+                <Form.Item
+                  {...(index === 0 ? FORM_ITEM_LAYOUT : FORM_ITEM_WITHOUT_LABEL)}
+                  label={index === 0 && 'whitelist'}
+                  key={field.key}
+                  required
+                  tooltip='List of hostname to whitelist. The hostname can be started with * as a wildcard.'
+                >
+                  <Form.Item
+                    {...field}
+                    validateTrigger={['onChange', 'onBlur']}
+                    required
+                    noStyle
+                  >
+                    <Input />
+                  </Form.Item>
+                  {fields.length > 1 ? (
+                    <MinusCircleOutlined
+                      className="dynamic-delete-button"
+                      onClick={() => {
+                        remove(field.name);
+                      }}
+                    />
+                  ) : null}
+                </Form.Item>
+              ))}
+              {
+                <Form.Item {...FORM_ITEM_WITHOUT_LABEL}>
+                  <Button
+                    type="dashed"
+                    data-cy="addHost"
+                    onClick={() => {
+                      add();
+                    }}
+                  >
+                    <PlusOutlined /> {formatMessage({ id: 'component.global.create' })}
+                  </Button>
+                </Form.Item>
+              }
+            </div>
+          );
+        }}
+      </Form.List>
+      <Form.Item
+        label="bypass_missing"
+        name="bypass_missing"
+        valuePropName="checked"
+        tooltip='Whether to bypass the check when the Referer header is missing or malformed.'
+      >
+        <Switch />
+      </Form.Item>
+    </Form>
+  );
+}
+
+export default RefererRestriction;

Review comment:
       updated, tks.




-- 
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 pull request #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
LiteSun commented on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-816578427


   > Can you provide a screenshot of the effect?
   
   sure.


-- 
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] netlify[bot] edited a comment on pull request #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-817649660


   Deploy preview for *apisix-dashboard* ready!
   
   Built with commit 0cbfd22eb58872c63d2ab242933af2fcba73f058
   
   https://deploy-preview-1727--apisix-dashboard.netlify.app


-- 
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 #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
LiteSun commented on a change in pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#discussion_r613295399



##########
File path: web/cypress/support/commands.js
##########
@@ -66,6 +66,18 @@ Cypress.Commands.add('configurePlugins', (cases) => {
 
         // NOTE: wait for the Drawer to appear on the DOM
         cy.focused(domSelector.drawer).should('exist');
+
+        cy.get(domSelector.codeMirrorMode).invoke('text').then(text => {
+          if (text === 'Form') {
+            // FIXME: https://github.com/cypress-io/cypress/issues/7306

Review comment:
       sure. #1738 




-- 
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 #1727: feat: add referer-restriction plugin form

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1727:
URL: https://github.com/apache/apisix-dashboard/pull/1727#issuecomment-817269980


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1727](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d0d70a6) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/1fa467a3ffc627e37cc7057b6c1887eb4eba2c31?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1fa467a) will **decrease** coverage by `4.37%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head d0d70a6 differs from pull request most recent head 308d4d6. Consider uploading reports for the commit 308d4d6 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1727      +/-   ##
   ==========================================
   - Coverage   71.35%   66.97%   -4.38%     
   ==========================================
     Files          47       47              
     Lines        3128     3128              
   ==========================================
   - Hits         2232     2095     -137     
   - Misses        656      778     +122     
   - Partials      240      255      +15     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `46.86% <ø> (-15.25%)` | :arrow_down: |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `52.29% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...l/handler/route\_online\_debug/route\_online\_debug.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGVfb25saW5lX2RlYnVnL3JvdXRlX29ubGluZV9kZWJ1Zy5nbw==) | `5.35% <0.00%> (-71.43%)` | :arrow_down: |
   | [api/internal/handler/healthz/healthz.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGVhbHRoei9oZWFsdGh6Lmdv) | `66.66% <0.00%> (-33.34%)` | :arrow_down: |
   | [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `31.93% <0.00%> (-23.53%)` | :arrow_down: |
   | [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `81.25% <0.00%> (-18.75%)` | :arrow_down: |
   | [api/internal/log/log.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2xvZy9sb2cuZ28=) | `40.00% <0.00%> (-10.00%)` | :arrow_down: |
   | [api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2NoZW1hL3NjaGVtYS5nbw==) | `90.47% <0.00%> (-9.53%)` | :arrow_down: |
   | [api/internal/handler/handler.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGFuZGxlci5nbw==) | `68.51% <0.00%> (-9.26%)` | :arrow_down: |
   | [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `63.55% <0.00%> (-7.48%)` | :arrow_down: |
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `71.42% <0.00%> (-7.35%)` | :arrow_down: |
   | [api/internal/handler/ssl/ssl.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3NsL3NzbC5nbw==) | `67.53% <0.00%> (-5.76%)` | :arrow_down: |
   | ... and [9 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1727/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1fa467a...308d4d6](https://codecov.io/gh/apache/apisix-dashboard/pull/1727?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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