You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/09/21 03:46:29 UTC

[GitHub] [apisix-dashboard] LiteSun commented on a change in pull request #483: feat: improve route

LiteSun commented on a change in pull request #483:
URL: https://github.com/apache/apisix-dashboard/pull/483#discussion_r491781970



##########
File path: src/pages/Route/transform.ts
##########
@@ -76,34 +80,33 @@ export const transformStepData = ({
       return [key, operator, value];
     }),
     upstream: {
-      type: step2Data.type,
+      type: form2Data.type,
       ...chashData,
       nodes,
-      timeout: step2Data.timeout,
+      timeout: form2Data.timeout,
     },
     upstream_header,
   };
 
-  if (step2Data.upstreamPath) {
+  if (form2Data.upstreamPath) {
     data.upstream_path = {
-      to: step2Data.upstreamPath,
+      to: form2Data.upstreamPath,
     };
-    if (step2Data.mappingStrategy) {
+    if (form2Data.mappingStrategy) {
       data.upstream_path = {
         ...data.upstream_path,
-        from: step2Data.mappingStrategy,
+        from: form2Data.mappingStrategy,
         type: 'regx',
       };
     }
   }
 
-  if (step3Data.plugins.prometheus) {
-    // eslint-disable-next-line no-param-reassign
-    step3Data.plugins.prometheus = {};
-  }
-
   // 未启用 redirect
   if (!redirect.uri) {
+    if (step3Data.plugins.prometheus) {
+      // eslint-disable-next-line no-param-reassign
+      step3Data.plugins.prometheus = {};

Review comment:
       ok




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