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 2022/08/05 07:07:35 UTC

[GitHub] [apisix-dashboard] Sh1-5 opened a new pull request, #2568: feat: support regex_uri attribute in redirect plugin (#2434)

Sh1-5 opened a new pull request, #2568:
URL: https://github.com/apache/apisix-dashboard/pull/2568

   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**
   
   fix/resolve #0001
   
   **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?
   - [ ] 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.

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 pull request #2568: feat: support regex_uri attribute in redirect plugin (#2434)

Posted by GitBox <gi...@apache.org>.
guoqqqi commented on PR #2568:
URL: https://github.com/apache/apisix-dashboard/pull/2568#issuecomment-1206157922

   hello, @Sh1-5 also need to update this case
   ![image](https://user-images.githubusercontent.com/72343596/183030229-ef87711a-50e9-4f5e-ba3a-91f96e7f7487.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.

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] Sh1-5 commented on a diff in pull request #2568: feat: support regex_uri attribute in redirect plugin (#2434)

Posted by GitBox <gi...@apache.org>.
Sh1-5 commented on code in PR #2568:
URL: https://github.com/apache/apisix-dashboard/pull/2568#discussion_r938616417


##########
web/cypress/integration/route/create-edit-route-with-redirect-plugin.spec.js:
##########
@@ -99,7 +98,6 @@ context('Create Edit and Delete Route with redirect plugin', () => {
     cy.contains(data.submitSuccess);
     cy.contains('Goto List').click();
     cy.url().should('contains', 'routes/list');
-    cy.contains(newName).should('be.visible');

Review Comment:
   because paging, I can't find 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 pull request #2568: feat: support regex_uri attribute in redirect plugin (#2434)

Posted by GitBox <gi...@apache.org>.
guoqqqi commented on PR #2568:
URL: https://github.com/apache/apisix-dashboard/pull/2568#issuecomment-1206203919

   Hi, @Sh1-5 Please check the logic when configuring the route, the default value of radio is not available 🤔
   ![image](https://user-images.githubusercontent.com/72343596/183039537-805a6678-909b-437d-86a9-195a5107ca9a.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.

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] Sh1-5 commented on a diff in pull request #2568: feat: support regex_uri attribute in redirect plugin (#2434)

Posted by GitBox <gi...@apache.org>.
Sh1-5 commented on code in PR #2568:
URL: https://github.com/apache/apisix-dashboard/pull/2568#discussion_r938650677


##########
web/cypress/integration/route/create-edit-route-with-redirect-plugin.spec.js:
##########
@@ -99,7 +98,6 @@ context('Create Edit and Delete Route with redirect plugin', () => {
     cy.contains(data.submitSuccess);
     cy.contains('Goto List').click();
     cy.url().should('contains', 'routes/list');
-    cy.contains(newName).should('be.visible');

Review Comment:
   Unless go search



-- 
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 pull request #2568: feat: support regex_uri attribute in redirect plugin (#2434)

Posted by GitBox <gi...@apache.org>.
guoqqqi commented on PR #2568:
URL: https://github.com/apache/apisix-dashboard/pull/2568#issuecomment-1207422526

   hello @Sh1-5 any update?


-- 
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] Sh1-5 commented on a diff in pull request #2568: feat: support regex_uri attribute in redirect plugin (#2434)

Posted by GitBox <gi...@apache.org>.
Sh1-5 commented on code in PR #2568:
URL: https://github.com/apache/apisix-dashboard/pull/2568#discussion_r938645988


##########
web/cypress/integration/route/create-edit-route-with-redirect-plugin.spec.js:
##########
@@ -99,7 +98,6 @@ context('Create Edit and Delete Route with redirect plugin', () => {
     cy.contains(data.submitSuccess);
     cy.contains('Goto List').click();
     cy.url().should('contains', 'routes/list');
-    cy.contains(newName).should('be.visible');

Review Comment:
   I use http://20.210.250.99:9000 as service, when I created a route, it was at the back of the page, the first page does't contain 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] Sh1-5 closed pull request #2568: feat: support regex_uri attribute in redirect plugin (#2434)

Posted by GitBox <gi...@apache.org>.
Sh1-5 closed pull request #2568: feat: support regex_uri attribute in redirect plugin (#2434)
URL: https://github.com/apache/apisix-dashboard/pull/2568


-- 
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] Sh1-5 commented on a diff in pull request #2568: feat: support regex_uri attribute in redirect plugin (#2434)

Posted by GitBox <gi...@apache.org>.
Sh1-5 commented on code in PR #2568:
URL: https://github.com/apache/apisix-dashboard/pull/2568#discussion_r938607028


##########
web/cypress/integration/route/create-edit-route-with-redirect-plugin.spec.js:
##########
@@ -17,8 +17,8 @@
 /* eslint-disable no-undef */
 
 context('Create Edit and Delete Route with redirect plugin', () => {
-  const name = `routeName${new Date().valueOf()}`;
-  const newName = `newName${new Date().valueOf()}`;
+  const name = `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDay()}`;
+  const newName = `${new Date().getFullYear()}*${new Date().getMonth() + 1}*${new Date().getDay()}`;

Review Comment:
   I encountered an error that text can't completly write in



-- 
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 diff in pull request #2568: feat: support regex_uri attribute in redirect plugin (#2434)

Posted by GitBox <gi...@apache.org>.
guoqqqi commented on code in PR #2568:
URL: https://github.com/apache/apisix-dashboard/pull/2568#discussion_r938639811


##########
web/cypress/integration/route/create-edit-route-with-redirect-plugin.spec.js:
##########
@@ -99,7 +98,6 @@ context('Create Edit and Delete Route with redirect plugin', () => {
     cy.contains(data.submitSuccess);
     cy.contains('Goto List').click();
     cy.url().should('contains', 'routes/list');
-    cy.contains(newName).should('be.visible');

Review Comment:
   I don't quite understand what this pagination refers to? Is it due to old data?I honestly don't think the problem should occur.



##########
web/cypress/integration/route/create-edit-route-with-redirect-plugin.spec.js:
##########
@@ -99,7 +98,6 @@ context('Create Edit and Delete Route with redirect plugin', () => {
     cy.contains(data.submitSuccess);
     cy.contains('Goto List').click();
     cy.url().should('contains', 'routes/list');
-    cy.contains(newName).should('be.visible');

Review Comment:
   I don't quite understand what this pagination refers to. Is it due to old data? I honestly don't think the problem should occur.



-- 
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] Sh1-5 commented on pull request #2568: feat: support regex_uri attribute in redirect plugin (#2434)

Posted by GitBox <gi...@apache.org>.
Sh1-5 commented on PR #2568:
URL: https://github.com/apache/apisix-dashboard/pull/2568#issuecomment-1206219414

   > Hi, @Sh1-5 Please check the logic when configuring the route, the default value of radio is not available 🤔 ![image](https://user-images.githubusercontent.com/72343596/183039537-805a6678-909b-437d-86a9-195a5107ca9a.png)
   
   ok, I found it just now.


-- 
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 diff in pull request #2568: feat: support regex_uri attribute in redirect plugin (#2434)

Posted by GitBox <gi...@apache.org>.
guoqqqi commented on code in PR #2568:
URL: https://github.com/apache/apisix-dashboard/pull/2568#discussion_r938638128


##########
web/cypress/integration/route/create-edit-route-with-redirect-plugin.spec.js:
##########
@@ -17,8 +17,8 @@
 /* eslint-disable no-undef */
 
 context('Create Edit and Delete Route with redirect plugin', () => {
-  const name = `routeName${new Date().valueOf()}`;
-  const newName = `newName${new Date().valueOf()}`;
+  const name = `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDay()}`;
+  const newName = `${new Date().getFullYear()}*${new Date().getMonth() + 1}*${new Date().getDay()}`;

Review Comment:
   Then or we can just use:
   ```
   const name = 'name';
   const newName = 'newName;
   ```



-- 
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 pull request #2568: feat: support regex_uri attribute in redirect plugin (#2434)

Posted by GitBox <gi...@apache.org>.
guoqqqi commented on PR #2568:
URL: https://github.com/apache/apisix-dashboard/pull/2568#issuecomment-1206257908

   also cc @SkyeYoung PTAL~


-- 
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] Sh1-5 commented on a diff in pull request #2568: feat: support regex_uri attribute in redirect plugin (#2434)

Posted by GitBox <gi...@apache.org>.
Sh1-5 commented on code in PR #2568:
URL: https://github.com/apache/apisix-dashboard/pull/2568#discussion_r938650311


##########
web/cypress/integration/route/create-edit-route-with-redirect-plugin.spec.js:
##########
@@ -99,7 +98,6 @@ context('Create Edit and Delete Route with redirect plugin', () => {
     cy.contains(data.submitSuccess);
     cy.contains('Goto List').click();
     cy.url().should('contains', 'routes/list');
-    cy.contains(newName).should('be.visible');

Review Comment:
   Unless lgo search



-- 
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] Sh1-5 commented on a diff in pull request #2568: feat: support regex_uri attribute in redirect plugin (#2434)

Posted by GitBox <gi...@apache.org>.
Sh1-5 commented on code in PR #2568:
URL: https://github.com/apache/apisix-dashboard/pull/2568#discussion_r938609198


##########
web/cypress/integration/route/create-edit-route-with-redirect-plugin.spec.js:
##########
@@ -99,7 +98,6 @@ context('Create Edit and Delete Route with redirect plugin', () => {
     cy.contains(data.submitSuccess);
     cy.contains('Goto List').click();
     cy.url().should('contains', 'routes/list');
-    cy.contains(newName).should('be.visible');

Review Comment:
   when we return routes/list, because the paging, 
   
   > Hi, @Sh1-5 Please check the logic when configuring the route, the default value of radio is not available 🤔 ![image](https://user-images.githubusercontent.com/72343596/183039537-805a6678-909b-437d-86a9-195a5107ca9a.png)
   
   ok, I found it just now



-- 
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 #2568: feat: support regex_uri attribute in redirect plugin (#2434)

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #2568:
URL: https://github.com/apache/apisix-dashboard/pull/2568#issuecomment-1206134757

   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2568?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 [#2568](https://codecov.io/gh/apache/apisix-dashboard/pull/2568?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2009c72) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/06a7118fa5ad2dac3b48d6ed289d49246046891e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (06a7118) will **decrease** coverage by `2.90%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #2568      +/-   ##
   ==========================================
   - Coverage   68.58%   65.67%   -2.91%     
   ==========================================
     Files         133       36      -97     
     Lines        3501      941    -2560     
     Branches      861      262     -599     
   ==========================================
   - Hits         2401      618    -1783     
   + Misses       1100      323     -777     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | frontend-e2e-test | `65.67% <ø> (-2.91%)` | :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/2568?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/helpers.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2568/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==) | `19.67% <0.00%> (-54.10%)` | :arrow_down: |
   | [web/src/components/RightContent/AvatarDropdown.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2568/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-d2ViL3NyYy9jb21wb25lbnRzL1JpZ2h0Q29udGVudC9BdmF0YXJEcm9wZG93bi50c3g=) | `50.00% <0.00%> (-32.15%)` | :arrow_down: |
   | [web/src/components/PanelSection/index.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2568/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-d2ViL3NyYy9jb21wb25lbnRzL1BhbmVsU2VjdGlvbi9pbmRleC50c3g=) | `75.00% <0.00%> (-25.00%)` | :arrow_down: |
   | [web/src/pages/Consumer/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2568/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-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9MaXN0LnRzeA==) | `69.44% <0.00%> (-22.23%)` | :arrow_down: |
   | [...b/src/components/Plugin/UI/referer-restriction.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2568/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==) | `69.69% <0.00%> (-21.22%)` | :arrow_down: |
   | [web/src/components/Plugin/PluginPage.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2568/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-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9QbHVnaW5QYWdlLnRzeA==) | `82.35% <0.00%> (-16.48%)` | :arrow_down: |
   | [web/src/components/ActionBar/ActionBar.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2568/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-d2ViL3NyYy9jb21wb25lbnRzL0FjdGlvbkJhci9BY3Rpb25CYXIudHN4) | `69.23% <0.00%> (-15.39%)` | :arrow_down: |
   | [web/src/app.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2568/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-d2ViL3NyYy9hcHAudHN4) | `87.87% <0.00%> (-12.13%)` | :arrow_down: |
   | [web/src/components/Plugin/UI/cors.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2568/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==) | `71.11% <0.00%> (-11.12%)` | :arrow_down: |
   | [web/src/components/RawDataEditor/RawDataEditor.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2568/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-d2ViL3NyYy9jb21wb25lbnRzL1Jhd0RhdGFFZGl0b3IvUmF3RGF0YUVkaXRvci50c3g=) | `28.57% <0.00%> (-10.39%)` | :arrow_down: |
   | ... and [102 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2568/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) | |
   
   :mega: Codecov can now indicate which changes are the most critical in Pull Requests. [Learn more](https://about.codecov.io/product/feature/runtime-insights/?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] guoqqqi commented on a diff in pull request #2568: feat: support regex_uri attribute in redirect plugin (#2434)

Posted by GitBox <gi...@apache.org>.
guoqqqi commented on code in PR #2568:
URL: https://github.com/apache/apisix-dashboard/pull/2568#discussion_r938554022


##########
web/cypress/integration/route/create-edit-route-with-redirect-plugin.spec.js:
##########
@@ -51,7 +51,6 @@ context('Create Edit and Delete Route with redirect plugin', () => {
   it('should create route with custom redirect plugin', function () {
     cy.visit('/');
     cy.contains('Route').click();
-    cy.get(selector.empty).should('be.visible');

Review Comment:
   why remove this line, this is to ensure that there is no other dirty data when the route is created



##########
web/cypress/integration/route/create-edit-route-with-redirect-plugin.spec.js:
##########
@@ -17,8 +17,8 @@
 /* eslint-disable no-undef */
 
 context('Create Edit and Delete Route with redirect plugin', () => {
-  const name = `routeName${new Date().valueOf()}`;
-  const newName = `newName${new Date().valueOf()}`;
+  const name = `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDay()}`;
+  const newName = `${new Date().getFullYear()}*${new Date().getMonth() + 1}*${new Date().getDay()}`;

Review Comment:
   In fact, I think it's enough that the two names are different and it doesn't require such a complicated calculation to get a name variable



##########
web/cypress/integration/route/create-edit-route-with-redirect-plugin.spec.js:
##########
@@ -99,7 +98,6 @@ context('Create Edit and Delete Route with redirect plugin', () => {
     cy.contains(data.submitSuccess);
     cy.contains('Goto List').click();
     cy.url().should('contains', 'routes/list');
-    cy.contains(newName).should('be.visible');

Review Comment:
   ditto, We need some assertions to be sure that the data return is normal



##########
web/src/pages/Route/components/Step1/MetaView.tsx:
##########
@@ -258,67 +269,195 @@ const MetaView: React.FC<RouteModule.Step1PassProps> = ({
     );
   };
 
-  const CustomRedirect: React.FC = () => (
-    <Form.Item
-      noStyle
-      shouldUpdate={(prev, next) => {
-        if (prev.redirectOption !== next.redirectOption) {
-          onChange({ action: 'redirectOptionChange', data: next.redirectOption });
-        }
-        return prev.redirectOption !== next.redirectOption;
-      }}
-    >
-      {() => {
-        if (form.getFieldValue('redirectOption') === 'customRedirect') {
-          return (
+  const CustomRedirectType = () => {
+    switch (form.getFieldValue('customRedirectType')) {
+      case CUSTOM_REDIRECT_TYPE.STATIC:
+        return (
+          <Form.Item
+            label={formatMessage({ id: 'page.route.form.itemLabel.redirectCustom' })}
+            required
+            style={{ marginBottom: 0 }}
+          >
+            <Row gutter={10}>
+              <Col span={5}>
+                <Form.Item
+                  name="redirectURI"
+                  rules={[
+                    {
+                      required: true,
+                      message: `${formatMessage({
+                        id: 'component.global.pleaseEnter',
+                      })}${formatMessage({
+                        id: 'page.route.form.itemLabel.redirectURI',
+                      })}`,
+                    },
+                  ]}
+                >
+                  <Input
+                    placeholder={formatMessage({
+                      id: 'page.route.input.placeholder.redirectCustom',
+                    })}
+                    disabled={disabled}
+                  />
+                </Form.Item>
+              </Col>
+              <Col span={5}>
+                <Form.Item name="ret_code" rules={[{ required: true }]}>
+                  <Select disabled={disabled} data-cy="redirect_code">
+                    <Select.Option value={301}>
+                      {formatMessage({ id: 'page.route.select.option.redirect301' })}
+                    </Select.Option>
+                    <Select.Option value={302}>
+                      {formatMessage({ id: 'page.route.select.option.redirect302' })}
+                    </Select.Option>
+                  </Select>
+                </Form.Item>
+              </Col>
+            </Row>
+          </Form.Item>
+        );
+      case CUSTOM_REDIRECT_TYPE.REGEXP:
+        return (
+          <React.Fragment>
+            <Form.List name="regex_uri" initialValue={['', '']}>
+              {(fields) =>
+                fields.map((field, index) => {
+                  switch (index) {
+                    case 0:

Review Comment:
   ```suggestion
                       case 0:
   ```
   `0` and `1` Not a good choice, it makes the code somewhat unreadable



##########
web/src/pages/Route/components/Step1/MetaView.tsx:
##########
@@ -258,67 +269,195 @@ const MetaView: React.FC<RouteModule.Step1PassProps> = ({
     );
   };
 
-  const CustomRedirect: React.FC = () => (
-    <Form.Item
-      noStyle
-      shouldUpdate={(prev, next) => {
-        if (prev.redirectOption !== next.redirectOption) {
-          onChange({ action: 'redirectOptionChange', data: next.redirectOption });
-        }
-        return prev.redirectOption !== next.redirectOption;
-      }}
-    >
-      {() => {
-        if (form.getFieldValue('redirectOption') === 'customRedirect') {
-          return (
+  const CustomRedirectType = () => {
+    switch (form.getFieldValue('customRedirectType')) {
+      case CUSTOM_REDIRECT_TYPE.STATIC:
+        return (
+          <Form.Item
+            label={formatMessage({ id: 'page.route.form.itemLabel.redirectCustom' })}
+            required
+            style={{ marginBottom: 0 }}
+          >
+            <Row gutter={10}>
+              <Col span={5}>
+                <Form.Item
+                  name="redirectURI"
+                  rules={[
+                    {
+                      required: true,
+                      message: `${formatMessage({
+                        id: 'component.global.pleaseEnter',
+                      })}${formatMessage({
+                        id: 'page.route.form.itemLabel.redirectURI',
+                      })}`,
+                    },
+                  ]}
+                >
+                  <Input
+                    placeholder={formatMessage({
+                      id: 'page.route.input.placeholder.redirectCustom',
+                    })}
+                    disabled={disabled}
+                  />
+                </Form.Item>
+              </Col>
+              <Col span={5}>
+                <Form.Item name="ret_code" rules={[{ required: true }]}>
+                  <Select disabled={disabled} data-cy="redirect_code">
+                    <Select.Option value={301}>
+                      {formatMessage({ id: 'page.route.select.option.redirect301' })}
+                    </Select.Option>
+                    <Select.Option value={302}>
+                      {formatMessage({ id: 'page.route.select.option.redirect302' })}
+                    </Select.Option>
+                  </Select>
+                </Form.Item>
+              </Col>
+            </Row>
+          </Form.Item>
+        );
+      case CUSTOM_REDIRECT_TYPE.REGEXP:
+        return (
+          <React.Fragment>
+            <Form.List name="regex_uri" initialValue={['', '']}>
+              {(fields) =>
+                fields.map((field, index) => {
+                  switch (index) {
+                    case 0:
+                      return (
+                        <Form.Item
+                          label={formatMessage({ id: 'page.route.form.itemLabel.regex' })}
+                          name={field.name}
+                          key={field.name}
+                          rules={[
+                            {
+                              required: true,
+                              message: `${formatMessage({
+                                id: 'component.global.pleaseEnter',
+                              })} ${formatMessage({ id: 'page.route.form.itemLabel.regex' })}`,
+                            },
+                          ]}
+                        >
+                          <Input
+                            placeholder={`${formatMessage({
+                              id: 'component.global.pleaseEnter',
+                            })} ${formatMessage({ id: 'page.route.form.itemLabel.regex' })}`}
+                            disabled={disabled}
+                          />
+                        </Form.Item>
+                      );
+                    case 1:
+                      return (
+                        <Form.Item
+                          label={formatMessage({ id: 'page.route.form.itemLabel.template' })}
+                          name={field.name}
+                          key={field.name}
+                          rules={[
+                            {
+                              required: true,
+                              message: `${formatMessage({
+                                id: 'component.global.pleaseEnter',
+                              })} ${formatMessage({ id: 'page.route.form.itemLabel.template' })}`,

Review Comment:
   ditto



##########
web/src/pages/Route/components/Step1/MetaView.tsx:
##########
@@ -258,67 +269,195 @@ const MetaView: React.FC<RouteModule.Step1PassProps> = ({
     );
   };
 
-  const CustomRedirect: React.FC = () => (
-    <Form.Item
-      noStyle
-      shouldUpdate={(prev, next) => {
-        if (prev.redirectOption !== next.redirectOption) {
-          onChange({ action: 'redirectOptionChange', data: next.redirectOption });
-        }
-        return prev.redirectOption !== next.redirectOption;
-      }}
-    >
-      {() => {
-        if (form.getFieldValue('redirectOption') === 'customRedirect') {
-          return (
+  const CustomRedirectType = () => {
+    switch (form.getFieldValue('customRedirectType')) {
+      case CUSTOM_REDIRECT_TYPE.STATIC:
+        return (
+          <Form.Item
+            label={formatMessage({ id: 'page.route.form.itemLabel.redirectCustom' })}
+            required
+            style={{ marginBottom: 0 }}
+          >
+            <Row gutter={10}>
+              <Col span={5}>
+                <Form.Item
+                  name="redirectURI"
+                  rules={[
+                    {
+                      required: true,
+                      message: `${formatMessage({
+                        id: 'component.global.pleaseEnter',
+                      })}${formatMessage({
+                        id: 'page.route.form.itemLabel.redirectURI',
+                      })}`,
+                    },
+                  ]}
+                >
+                  <Input
+                    placeholder={formatMessage({
+                      id: 'page.route.input.placeholder.redirectCustom',
+                    })}
+                    disabled={disabled}
+                  />
+                </Form.Item>
+              </Col>
+              <Col span={5}>
+                <Form.Item name="ret_code" rules={[{ required: true }]}>
+                  <Select disabled={disabled} data-cy="redirect_code">
+                    <Select.Option value={301}>
+                      {formatMessage({ id: 'page.route.select.option.redirect301' })}
+                    </Select.Option>
+                    <Select.Option value={302}>
+                      {formatMessage({ id: 'page.route.select.option.redirect302' })}
+                    </Select.Option>
+                  </Select>
+                </Form.Item>
+              </Col>
+            </Row>
+          </Form.Item>
+        );
+      case CUSTOM_REDIRECT_TYPE.REGEXP:
+        return (
+          <React.Fragment>
+            <Form.List name="regex_uri" initialValue={['', '']}>
+              {(fields) =>
+                fields.map((field, index) => {
+                  switch (index) {
+                    case 0:
+                      return (
+                        <Form.Item
+                          label={formatMessage({ id: 'page.route.form.itemLabel.regex' })}
+                          name={field.name}
+                          key={field.name}
+                          rules={[
+                            {
+                              required: true,
+                              message: `${formatMessage({
+                                id: 'component.global.pleaseEnter',
+                              })} ${formatMessage({ id: 'page.route.form.itemLabel.regex' })}`,

Review Comment:
   ditto



##########
web/cypress/integration/route/create-edit-route-with-redirect-regex-plugin.spec.js:
##########
@@ -0,0 +1,124 @@
+/*
+ * 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.
+ */
+/* eslint-disable no-undef */
+
+context('Create Edit and Delete Route with redirect plugin', () => {
+  const name = `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDay()}`;
+  const newName = `${new Date().getFullYear()}*${new Date().getMonth() + 1}*${new Date().getDay()}`;
+
+  const selector = {
+    empty: '.ant-empty-normal',
+    name: '#name',
+    redirect: '[data-cy=route-redirect]',
+    customRedirectSelectOpt: '#redirectOption_list_1',
+    regex: '#regex',
+    customRedirectCode: '[data-cy=redirect_code]',
+    customRedirectRegexLabel: "[title='Regexp']",
+    regexp: '#regex_uri_0',
+    template: '#regex_uri_1',
+    deleteAlert: '.ant-modal-body',
+    notificationCloseIcon: '.ant-notification-close-icon',
+    notification: '.ant-notification-notice-message',
+    webSocketSelector: '[title=WebSocket]',
+    enable_websocket_button: '#enable_websocket',
+  };
+
+  const data = {
+    customRedirectRegexUri: '^/iresty/(.)/(.)/(.*)',
+    customRedirectTemplate: '/$1-$2-$3',
+    submitSuccess: 'Submit Successfully',
+    deleteRouteSuccess: 'Delete Route Successfully',
+    step2Title: 'Define API Backend Server',
+    step3Title: 'Plugin Config',
+    setUpstreamNotice: 'If you do not bind the service, you must set the Upstream (Step 2)',
+  };
+
+  beforeEach(() => {
+    cy.login();
+  });
+
+  it('should create route with custom redirect plugin', function () {
+    cy.visit('/');
+    cy.contains('Route').click();
+    cy.contains('Create').click();
+    cy.contains('Next').click().click();
+    cy.get(selector.name).type(name);
+    cy.get(selector.redirect).click();
+    cy.contains('Custom').click({ force: true });

Review Comment:
   the `force` is a dangerous attribute and it is likely that he has not yet clicked on Custom Option



##########
web/src/pages/Route/components/Step1/MetaView.tsx:
##########
@@ -258,67 +269,195 @@ const MetaView: React.FC<RouteModule.Step1PassProps> = ({
     );
   };
 
-  const CustomRedirect: React.FC = () => (
-    <Form.Item
-      noStyle
-      shouldUpdate={(prev, next) => {
-        if (prev.redirectOption !== next.redirectOption) {
-          onChange({ action: 'redirectOptionChange', data: next.redirectOption });
-        }
-        return prev.redirectOption !== next.redirectOption;
-      }}
-    >
-      {() => {
-        if (form.getFieldValue('redirectOption') === 'customRedirect') {
-          return (
+  const CustomRedirectType = () => {
+    switch (form.getFieldValue('customRedirectType')) {
+      case CUSTOM_REDIRECT_TYPE.STATIC:
+        return (
+          <Form.Item
+            label={formatMessage({ id: 'page.route.form.itemLabel.redirectCustom' })}
+            required
+            style={{ marginBottom: 0 }}
+          >
+            <Row gutter={10}>
+              <Col span={5}>
+                <Form.Item
+                  name="redirectURI"
+                  rules={[
+                    {
+                      required: true,
+                      message: `${formatMessage({
+                        id: 'component.global.pleaseEnter',
+                      })}${formatMessage({
+                        id: 'page.route.form.itemLabel.redirectURI',
+                      })}`,

Review Comment:
   It is better not to use template strings to complete the internationalization, the Chinese state will have extra spaces



##########
web/cypress/integration/route/create-edit-route-with-redirect-regex-plugin.spec.js:
##########
@@ -0,0 +1,124 @@
+/*
+ * 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.
+ */
+/* eslint-disable no-undef */
+
+context('Create Edit and Delete Route with redirect plugin', () => {
+  const name = `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDay()}`;
+  const newName = `${new Date().getFullYear()}*${new Date().getMonth() + 1}*${new Date().getDay()}`;
+
+  const selector = {
+    empty: '.ant-empty-normal',
+    name: '#name',
+    redirect: '[data-cy=route-redirect]',
+    customRedirectSelectOpt: '#redirectOption_list_1',
+    regex: '#regex',
+    customRedirectCode: '[data-cy=redirect_code]',
+    customRedirectRegexLabel: "[title='Regexp']",
+    regexp: '#regex_uri_0',
+    template: '#regex_uri_1',
+    deleteAlert: '.ant-modal-body',
+    notificationCloseIcon: '.ant-notification-close-icon',
+    notification: '.ant-notification-notice-message',
+    webSocketSelector: '[title=WebSocket]',
+    enable_websocket_button: '#enable_websocket',
+  };
+
+  const data = {
+    customRedirectRegexUri: '^/iresty/(.)/(.)/(.*)',
+    customRedirectTemplate: '/$1-$2-$3',
+    submitSuccess: 'Submit Successfully',
+    deleteRouteSuccess: 'Delete Route Successfully',
+    step2Title: 'Define API Backend Server',
+    step3Title: 'Plugin Config',
+    setUpstreamNotice: 'If you do not bind the service, you must set the Upstream (Step 2)',
+  };
+
+  beforeEach(() => {
+    cy.login();
+  });
+
+  it('should create route with custom redirect plugin', function () {
+    cy.visit('/');
+    cy.contains('Route').click();
+    cy.contains('Create').click();
+    cy.contains('Next').click().click();
+    cy.get(selector.name).type(name);
+    cy.get(selector.redirect).click();
+    cy.contains('Custom').click({ force: true });
+    cy.get(selector.regex).click();
+
+    // after choose Custom option, Custom Redirect form field should be visible
+    cy.get(selector.customRedirectRegexLabel).should('be.visible');
+    cy.get(selector.regexp).should('be.visible');
+    cy.get(selector.template).should('be.visible');
+    cy.get(selector.customRedirectCode).should('be.visible');
+    cy.get(selector.webSocketSelector).should('exist');
+    cy.get(selector.enable_websocket_button).should('exist');
+
+    // step 2 and step 3 should not be visible
+    cy.contains(data.step2Title).should('not.exist');
+    cy.contains(data.step3Title).should('not.exist');
+    // type customRedirectRegexUri and customRedirectTemplate
+    cy.get(selector.regexp).type(data.customRedirectRegexUri);
+    cy.get(selector.template).type(data.customRedirectTemplate);
+    cy.contains('Next').click();
+    cy.contains('Submit').click();
+    cy.contains(data.submitSuccess);
+
+    // back to route list page
+    cy.contains('Goto List').click();
+    cy.url().should('contains', 'routes/list');
+  });
+
+  it('should edit the route without notice', function () {

Review Comment:
   When editing this route, you should ensure that the data created is displayed back properly



##########
web/src/pages/Route/components/Step1/MetaView.tsx:
##########
@@ -258,67 +269,195 @@ const MetaView: React.FC<RouteModule.Step1PassProps> = ({
     );
   };
 
-  const CustomRedirect: React.FC = () => (
-    <Form.Item
-      noStyle
-      shouldUpdate={(prev, next) => {
-        if (prev.redirectOption !== next.redirectOption) {
-          onChange({ action: 'redirectOptionChange', data: next.redirectOption });
-        }
-        return prev.redirectOption !== next.redirectOption;
-      }}
-    >
-      {() => {
-        if (form.getFieldValue('redirectOption') === 'customRedirect') {
-          return (
+  const CustomRedirectType = () => {
+    switch (form.getFieldValue('customRedirectType')) {
+      case CUSTOM_REDIRECT_TYPE.STATIC:
+        return (
+          <Form.Item
+            label={formatMessage({ id: 'page.route.form.itemLabel.redirectCustom' })}
+            required
+            style={{ marginBottom: 0 }}
+          >
+            <Row gutter={10}>
+              <Col span={5}>
+                <Form.Item
+                  name="redirectURI"
+                  rules={[
+                    {
+                      required: true,
+                      message: `${formatMessage({
+                        id: 'component.global.pleaseEnter',
+                      })}${formatMessage({
+                        id: 'page.route.form.itemLabel.redirectURI',
+                      })}`,
+                    },
+                  ]}
+                >
+                  <Input
+                    placeholder={formatMessage({
+                      id: 'page.route.input.placeholder.redirectCustom',
+                    })}
+                    disabled={disabled}
+                  />
+                </Form.Item>
+              </Col>
+              <Col span={5}>
+                <Form.Item name="ret_code" rules={[{ required: true }]}>
+                  <Select disabled={disabled} data-cy="redirect_code">
+                    <Select.Option value={301}>
+                      {formatMessage({ id: 'page.route.select.option.redirect301' })}
+                    </Select.Option>
+                    <Select.Option value={302}>
+                      {formatMessage({ id: 'page.route.select.option.redirect302' })}
+                    </Select.Option>
+                  </Select>
+                </Form.Item>
+              </Col>
+            </Row>
+          </Form.Item>
+        );
+      case CUSTOM_REDIRECT_TYPE.REGEXP:
+        return (
+          <React.Fragment>
+            <Form.List name="regex_uri" initialValue={['', '']}>
+              {(fields) =>
+                fields.map((field, index) => {
+                  switch (index) {
+                    case 0:
+                      return (
+                        <Form.Item
+                          label={formatMessage({ id: 'page.route.form.itemLabel.regex' })}
+                          name={field.name}
+                          key={field.name}
+                          rules={[
+                            {
+                              required: true,
+                              message: `${formatMessage({
+                                id: 'component.global.pleaseEnter',
+                              })} ${formatMessage({ id: 'page.route.form.itemLabel.regex' })}`,
+                            },
+                          ]}
+                        >
+                          <Input
+                            placeholder={`${formatMessage({
+                              id: 'component.global.pleaseEnter',
+                            })} ${formatMessage({ id: 'page.route.form.itemLabel.regex' })}`}
+                            disabled={disabled}
+                          />
+                        </Form.Item>
+                      );
+                    case 1:
+                      return (
+                        <Form.Item
+                          label={formatMessage({ id: 'page.route.form.itemLabel.template' })}
+                          name={field.name}
+                          key={field.name}
+                          rules={[
+                            {
+                              required: true,
+                              message: `${formatMessage({
+                                id: 'component.global.pleaseEnter',
+                              })} ${formatMessage({ id: 'page.route.form.itemLabel.template' })}`,
+                            },
+                          ]}
+                        >
+                          <Input
+                            placeholder={`${formatMessage({
+                              id: 'component.global.pleaseEnter',
+                            })} ${formatMessage({ id: 'page.route.form.itemLabel.template' })}`}

Review Comment:
   ditto



##########
web/cypress/integration/route/create-edit-route-with-redirect-regex-plugin.spec.js:
##########
@@ -0,0 +1,124 @@
+/*
+ * 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.
+ */
+/* eslint-disable no-undef */
+
+context('Create Edit and Delete Route with redirect plugin', () => {
+  const name = `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDay()}`;
+  const newName = `${new Date().getFullYear()}*${new Date().getMonth() + 1}*${new Date().getDay()}`;
+
+  const selector = {
+    empty: '.ant-empty-normal',
+    name: '#name',
+    redirect: '[data-cy=route-redirect]',
+    customRedirectSelectOpt: '#redirectOption_list_1',
+    regex: '#regex',
+    customRedirectCode: '[data-cy=redirect_code]',
+    customRedirectRegexLabel: "[title='Regexp']",
+    regexp: '#regex_uri_0',
+    template: '#regex_uri_1',
+    deleteAlert: '.ant-modal-body',
+    notificationCloseIcon: '.ant-notification-close-icon',
+    notification: '.ant-notification-notice-message',
+    webSocketSelector: '[title=WebSocket]',
+    enable_websocket_button: '#enable_websocket',
+  };
+
+  const data = {
+    customRedirectRegexUri: '^/iresty/(.)/(.)/(.*)',
+    customRedirectTemplate: '/$1-$2-$3',
+    submitSuccess: 'Submit Successfully',
+    deleteRouteSuccess: 'Delete Route Successfully',
+    step2Title: 'Define API Backend Server',
+    step3Title: 'Plugin Config',
+    setUpstreamNotice: 'If you do not bind the service, you must set the Upstream (Step 2)',
+  };
+
+  beforeEach(() => {
+    cy.login();
+  });
+
+  it('should create route with custom redirect plugin', function () {
+    cy.visit('/');
+    cy.contains('Route').click();
+    cy.contains('Create').click();
+    cy.contains('Next').click().click();
+    cy.get(selector.name).type(name);
+    cy.get(selector.redirect).click();
+    cy.contains('Custom').click({ force: true });
+    cy.get(selector.regex).click();
+
+    // after choose Custom option, Custom Redirect form field should be visible
+    cy.get(selector.customRedirectRegexLabel).should('be.visible');
+    cy.get(selector.regexp).should('be.visible');
+    cy.get(selector.template).should('be.visible');
+    cy.get(selector.customRedirectCode).should('be.visible');
+    cy.get(selector.webSocketSelector).should('exist');
+    cy.get(selector.enable_websocket_button).should('exist');
+
+    // step 2 and step 3 should not be visible
+    cy.contains(data.step2Title).should('not.exist');
+    cy.contains(data.step3Title).should('not.exist');
+    // type customRedirectRegexUri and customRedirectTemplate
+    cy.get(selector.regexp).type(data.customRedirectRegexUri);
+    cy.get(selector.template).type(data.customRedirectTemplate);
+    cy.contains('Next').click();
+    cy.contains('Submit').click();
+    cy.contains(data.submitSuccess);
+
+    // back to route list page
+    cy.contains('Goto List').click();
+    cy.url().should('contains', 'routes/list');
+  });
+
+  it('should edit the route without notice', function () {
+    cy.visit('/');
+    cy.contains('Route').click();
+
+    cy.get(selector.name).type(name);
+    cy.contains('Search').click();
+    cy.contains(name).siblings().contains('Configure').click();
+
+    // NOTE: make sure all components rerender done
+    cy.get('#status').should('have.class', 'ant-switch-checked');
+    // should not shown set upstream notice
+    cy.contains(data.setUpstreamNotice).should('not.exist');
+    cy.get(selector.name).clear().type(newName);
+    cy.get(selector.webSocketSelector).should('exist');
+    cy.get(selector.enable_websocket_button).should('exist');
+
+    cy.contains('Next').click();
+    cy.contains('Submit').click();
+    cy.contains(data.submitSuccess);
+    cy.contains('Goto List').click();
+    cy.url().should('contains', 'routes/list');
+  });
+
+  it('should delete the route', function () {
+    cy.visit('/routes/list');
+    cy.get(selector.name).clear().type(newName);
+    cy.contains('Search').click();
+    cy.contains(newName).siblings().contains('More').click();
+    cy.contains('Delete').click();
+    cy.get(selector.deleteAlert)
+      .should('be.visible')
+      .within(() => {
+        cy.contains('OK').click();
+      });
+    cy.get(selector.notification).should('contain', data.deleteRouteSuccess);
+    cy.get(selector.notificationCloseIcon).click({ multiple: true });

Review Comment:
   ```suggestion
       cy.get(selector.notificationCloseIcon).click();
   ```
   No need to click continuously if there is only one prompt



##########
web/src/pages/Route/components/Step1/MetaView.tsx:
##########
@@ -258,67 +269,195 @@ const MetaView: React.FC<RouteModule.Step1PassProps> = ({
     );
   };
 
-  const CustomRedirect: React.FC = () => (
-    <Form.Item
-      noStyle
-      shouldUpdate={(prev, next) => {
-        if (prev.redirectOption !== next.redirectOption) {
-          onChange({ action: 'redirectOptionChange', data: next.redirectOption });
-        }
-        return prev.redirectOption !== next.redirectOption;
-      }}
-    >
-      {() => {
-        if (form.getFieldValue('redirectOption') === 'customRedirect') {
-          return (
+  const CustomRedirectType = () => {
+    switch (form.getFieldValue('customRedirectType')) {
+      case CUSTOM_REDIRECT_TYPE.STATIC:
+        return (
+          <Form.Item
+            label={formatMessage({ id: 'page.route.form.itemLabel.redirectCustom' })}
+            required
+            style={{ marginBottom: 0 }}
+          >
+            <Row gutter={10}>
+              <Col span={5}>
+                <Form.Item
+                  name="redirectURI"
+                  rules={[
+                    {
+                      required: true,
+                      message: `${formatMessage({
+                        id: 'component.global.pleaseEnter',
+                      })}${formatMessage({
+                        id: 'page.route.form.itemLabel.redirectURI',
+                      })}`,
+                    },
+                  ]}
+                >
+                  <Input
+                    placeholder={formatMessage({
+                      id: 'page.route.input.placeholder.redirectCustom',
+                    })}
+                    disabled={disabled}
+                  />
+                </Form.Item>
+              </Col>
+              <Col span={5}>
+                <Form.Item name="ret_code" rules={[{ required: true }]}>
+                  <Select disabled={disabled} data-cy="redirect_code">
+                    <Select.Option value={301}>
+                      {formatMessage({ id: 'page.route.select.option.redirect301' })}
+                    </Select.Option>
+                    <Select.Option value={302}>
+                      {formatMessage({ id: 'page.route.select.option.redirect302' })}
+                    </Select.Option>
+                  </Select>
+                </Form.Item>
+              </Col>
+            </Row>
+          </Form.Item>
+        );
+      case CUSTOM_REDIRECT_TYPE.REGEXP:
+        return (
+          <React.Fragment>
+            <Form.List name="regex_uri" initialValue={['', '']}>
+              {(fields) =>
+                fields.map((field, index) => {
+                  switch (index) {
+                    case 0:
+                      return (
+                        <Form.Item
+                          label={formatMessage({ id: 'page.route.form.itemLabel.regex' })}
+                          name={field.name}
+                          key={field.name}
+                          rules={[
+                            {
+                              required: true,
+                              message: `${formatMessage({
+                                id: 'component.global.pleaseEnter',
+                              })} ${formatMessage({ id: 'page.route.form.itemLabel.regex' })}`,
+                            },
+                          ]}
+                        >
+                          <Input
+                            placeholder={`${formatMessage({
+                              id: 'component.global.pleaseEnter',
+                            })} ${formatMessage({ id: 'page.route.form.itemLabel.regex' })}`}

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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org