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/07/24 05:17:22 UTC
[GitHub] [apisix-dashboard] wmdmomo opened a new pull request #1994: Feature cors 20210722
wmdmomo opened a new pull request #1994:
URL: https://github.com/apache/apisix-dashboard/pull/1994
Please answer these questions before submitting a pull request, **or your PR will get closed**.
**Why submit this pull request?**
- [ ] Bugfix
- [ ] New feature provided
- [x] Improve performance
- [ ] Backport patches
**What changes will this PR take into?**
The PR will change the plugin under plugin/UI (Cors), allowing Cors to dynamically adapt to the back-end json rules.
**Related issues**
fix/resolve #1588
**Checklist:**
- [x] Did you explain what problem does this PR solve? Or what new features have been added?
- [x] Have you added corresponding test cases?
- [x] Have you modified the corresponding document?
- [x] 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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1994: feat(plugin): allowing cors to dynamically adapt to the BE rules
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1994:
URL: https://github.com/apache/apisix-dashboard/pull/1994#issuecomment-886001902
βοΈ Deploy Preview for *apisix-dashboard* ready!
π¨ Explore the source changes: fea1e8610a5b9b2a30be5e7737b5a5ebb40d8042
π Inspect the deploy log: [https://app.netlify.com/sites/apisix-dashboard/deploys/61110b05188f0b0007e25400](https://app.netlify.com/sites/apisix-dashboard/deploys/61110b05188f0b0007e25400?utm_source=github&utm_campaign=bot_dl)
π Browse the preview: [https://deploy-preview-1994--apisix-dashboard.netlify.app/](https://deploy-preview-1994--apisix-dashboard.netlify.app/?utm_source=github&utm_campaign=bot_dp)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1994: feat(plugin): allowing cors to dynamically adapt to the BE rules
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1994:
URL: https://github.com/apache/apisix-dashboard/pull/1994#issuecomment-886306731
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1994?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 [#1994](https://codecov.io/gh/apache/apisix-dashboard/pull/1994?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c568b0e) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/0b5196f0b444dac8acb5cf60635806f024de6a0a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0b5196f) will **increase** coverage by `0.00%`.
> The diff coverage is `100.00%`.
> :exclamation: Current head c568b0e differs from pull request most recent head 5a0a880. Consider uploading reports for the commit 5a0a880 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1994/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/1994?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 #1994 +/- ##
=======================================
Coverage 64.01% 64.01%
=======================================
Files 122 122
Lines 3154 3160 +6
Branches 753 754 +1
=======================================
+ Hits 2019 2023 +4
- Misses 1135 1137 +2
```
| Flag | Coverage Ξ | |
|---|---|---|
| frontend-e2e-test | `64.01% <100.00%> (+<0.01%)` | :arrow_up: |
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/1994?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Ξ | |
|---|---|---|
| [web/src/components/Plugin/PluginDetail.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1994/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-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9QbHVnaW5EZXRhaWwudHN4) | `65.82% <100.00%> (+0.21%)` | :arrow_up: |
| [web/src/components/Plugin/UI/cors.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1994/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-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9VSS9jb3JzLnRzeA==) | `89.28% <100.00%> (+2.32%)` | :arrow_up: |
| [web/src/components/Plugin/UI/plugin.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1994/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) | `82.60% <100.00%> (ΓΈ)` | |
| [web/src/helpers.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1994/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-d2ViL3NyYy9oZWxwZXJzLnRzeA==) | `68.85% <0.00%> (-3.28%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1994?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/1994?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 [0b5196f...5a0a880](https://codecov.io/gh/apache/apisix-dashboard/pull/1994?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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1994: feat(plugin): fix UI Cors
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1994:
URL: https://github.com/apache/apisix-dashboard/pull/1994#issuecomment-886001902
βοΈ Deploy Preview for *apisix-dashboard* ready!
π¨ Explore the source changes: 7176da9c264886df0352f7c70f20a157503c80d2
π Inspect the deploy log: [https://app.netlify.com/sites/apisix-dashboard/deploys/60fba2583a375500070b5940](https://app.netlify.com/sites/apisix-dashboard/deploys/60fba2583a375500070b5940?utm_source=github&utm_campaign=bot_dl)
π Browse the preview: [https://deploy-preview-1994--apisix-dashboard.netlify.app/](https://deploy-preview-1994--apisix-dashboard.netlify.app/?utm_source=github&utm_campaign=bot_dp)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1994: feat(plugin): allowing cors to dynamically adapt to the BE rules
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1994:
URL: https://github.com/apache/apisix-dashboard/pull/1994#issuecomment-886001902
π· Deploy Preview for *apisix-dashboard* processing.
π¨ Explore the source changes: 5a0a880a8a14740e974e9fe277afa9bb254990d4
π Inspect the deploy log: [https://app.netlify.com/sites/apisix-dashboard/deploys/60ffbacff50a9800072f2d9c](https://app.netlify.com/sites/apisix-dashboard/deploys/60ffbacff50a9800072f2d9c?utm_source=github&utm_campaign=bot_dl)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1994: feat(plugin): allowing cors to dynamically adapt to the BE rules
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1994:
URL: https://github.com/apache/apisix-dashboard/pull/1994#issuecomment-886001902
π· Deploy Preview for *apisix-dashboard* processing.
π¨ Explore the source changes: fea1e8610a5b9b2a30be5e7737b5a5ebb40d8042
π Inspect the deploy log: [https://app.netlify.com/sites/apisix-dashboard/deploys/61110b05188f0b0007e25400](https://app.netlify.com/sites/apisix-dashboard/deploys/61110b05188f0b0007e25400?utm_source=github&utm_campaign=bot_dl)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] wmdmomo commented on a change in pull request #1994: feat(plugin): allowing cors to dynamically adapt to the BE rules
Posted by GitBox <gi...@apache.org>.
wmdmomo commented on a change in pull request #1994:
URL: https://github.com/apache/apisix-dashboard/pull/1994#discussion_r677206186
##########
File path: web/src/components/Plugin/UI/cors.tsx
##########
@@ -156,15 +161,15 @@ const Cors: React.FC<Props> = ({ form }) => {
))}
{
<Form.Item {...FORM_ITEM_WITHOUT_LABEL}>
- <Button
+ {fields.length < maxLength? (<Button
Review comment:
Thanks for your suggestion, I have modified it
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] guoqqqi commented on a change in pull request #1994: feat(plugin): allowing cors to dynamically adapt to the BE rules
Posted by GitBox <gi...@apache.org>.
guoqqqi commented on a change in pull request #1994:
URL: https://github.com/apache/apisix-dashboard/pull/1994#discussion_r676787154
##########
File path: web/src/components/Plugin/UI/cors.tsx
##########
@@ -156,15 +161,15 @@ const Cors: React.FC<Props> = ({ form }) => {
))}
{
<Form.Item {...FORM_ITEM_WITHOUT_LABEL}>
- <Button
+ {fields.length < maxLength? (<Button
Review comment:
`{fields.length < maxLength && <Button>...</Button>}`
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter commented on pull request #1994: feat(plugin): fix UI Cors
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #1994:
URL: https://github.com/apache/apisix-dashboard/pull/1994#issuecomment-886306731
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1994?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 [#1994](https://codecov.io/gh/apache/apisix-dashboard/pull/1994?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7176da9) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/0b5196f0b444dac8acb5cf60635806f024de6a0a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0b5196f) will **increase** coverage by `0.04%`.
> The diff coverage is `90.90%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1994/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/1994?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 #1994 +/- ##
==========================================
+ Coverage 64.01% 64.06% +0.04%
==========================================
Files 122 122
Lines 3154 3161 +7
Branches 753 755 +2
==========================================
+ Hits 2019 2025 +6
- Misses 1135 1136 +1
```
| Flag | Coverage Ξ | |
|---|---|---|
| frontend-e2e-test | `64.06% <90.90%> (+0.04%)` | :arrow_up: |
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/1994?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Ξ | |
|---|---|---|
| [web/src/components/Plugin/UI/cors.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1994/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-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9VSS9jb3JzLnRzeA==) | `86.20% <85.71%> (-0.75%)` | :arrow_down: |
| [web/src/components/Plugin/PluginDetail.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1994/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-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9QbHVnaW5EZXRhaWwudHN4) | `65.82% <100.00%> (+0.21%)` | :arrow_up: |
| [web/src/components/Plugin/UI/plugin.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1994/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) | `82.60% <100.00%> (ΓΈ)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1994?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/1994?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 [0b5196f...7176da9](https://codecov.io/gh/apache/apisix-dashboard/pull/1994?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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] commented on pull request #1994: Feature cors 20210722
Posted by GitBox <gi...@apache.org>.
netlify[bot] commented on pull request #1994:
URL: https://github.com/apache/apisix-dashboard/pull/1994#issuecomment-886001902
π· Deploy Preview for *apisix-dashboard* processing.
π¨ Explore the source changes: 7176da9c264886df0352f7c70f20a157503c80d2
π Inspect the deploy log: [https://app.netlify.com/sites/apisix-dashboard/deploys/60fba2583a375500070b5940](https://app.netlify.com/sites/apisix-dashboard/deploys/60fba2583a375500070b5940?utm_source=github&utm_campaign=bot_dl)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] liuxiran merged pull request #1994: feat(plugin): allowing cors to dynamically adapt to the BE rules
Posted by GitBox <gi...@apache.org>.
liuxiran merged pull request #1994:
URL: https://github.com/apache/apisix-dashboard/pull/1994
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1994: feat(plugin): allowing cors to dynamically adapt to the BE rules
Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1994:
URL: https://github.com/apache/apisix-dashboard/pull/1994#issuecomment-886001902
βοΈ Deploy Preview for *apisix-dashboard* ready!
π¨ Explore the source changes: 5a0a880a8a14740e974e9fe277afa9bb254990d4
π Inspect the deploy log: [https://app.netlify.com/sites/apisix-dashboard/deploys/60ffbacff50a9800072f2d9c](https://app.netlify.com/sites/apisix-dashboard/deploys/60ffbacff50a9800072f2d9c?utm_source=github&utm_campaign=bot_dl)
π Browse the preview: [https://deploy-preview-1994--apisix-dashboard.netlify.app/](https://deploy-preview-1994--apisix-dashboard.netlify.app/?utm_source=github&utm_campaign=bot_dp)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on a change in pull request #1994: feat(plugin): allowing cors to dynamically adapt to the BE rules
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #1994:
URL: https://github.com/apache/apisix-dashboard/pull/1994#discussion_r677928888
##########
File path: web/src/components/Plugin/UI/cors.tsx
##########
@@ -40,8 +41,12 @@ export const FORM_ITEM_WITHOUT_LABEL = {
},
};
-const Cors: React.FC<Props> = ({ form }) => {
+const Cors: React.FC<Props> = ({ form, schema }) => {
const { formatMessage } = useIntl();
+ const properties = schema?.properties
Review comment:
If we don't pass `schema`, `properties` will be undefined π€ right?
Should we have a check that this Property must be passed
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org