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/03/14 01:51:19 UTC

[GitHub] [apisix-dashboard] Baoyuantop commented on a change in pull request #2347: feat: Merge path hostname input box

Baoyuantop commented on a change in pull request #2347:
URL: https://github.com/apache/apisix-dashboard/pull/2347#discussion_r825543066



##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -55,6 +55,7 @@ context('Create and Delete Upstream', () => {
     weight0: '2',
     port1: '7001',
     weight1: '2',
+    url_input: 'www.baidu.com/test/asd',

Review comment:
       Do we need to test for incorrect inputs?

##########
File path: web/src/pages/Upstream/Create.tsx
##########
@@ -44,6 +43,15 @@ const Page: React.FC = (props) => {
           }
         }
 
+        if (newData?.checks?.active) {
+          const host = newData?.checks?.active.host;
+          const http_path = newData?.checks?.active.http_path;
+          const url = host + http_path;
+          const { active: activeData } = newData.checks;
+          delete activeData.host;
+          delete activeData.http_path;

Review comment:
       We would prefer to use a deep clone before these operations.
   I see that the operation in line 37 is not quite suitable, can you help me to change 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