You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ju...@apache.org on 2020/06/05 13:04:47 UTC

[incubator-apisix-dashboard] branch next updated: fix: wrong stepHeader when switch forceHttps (#247)

This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-dashboard.git


The following commit(s) were added to refs/heads/next by this push:
     new 3b43943  fix: wrong stepHeader when switch forceHttps (#247)
3b43943 is described below

commit 3b4394358c393cbed2eac817530914ae42ed9d30
Author: litesun <31...@users.noreply.github.com>
AuthorDate: Fri Jun 5 21:04:38 2020 +0800

    fix: wrong stepHeader when switch forceHttps (#247)
    
    * feat: limit upload file
    
    * feat: intercept default upload api request
    
    * feat: limit upload file type
    
    * fix: show file when parse SSL file  fail
    
    * feat: add search feature
    
    * feat: format code
    
    * fix: remove list item not work
    
    * feat: remove relatedRouting
    
    * feat: add routes step1 page
    
    * feat: update route
    
    * feat: format code
    
    * feat: update
    
    * feat: update
    
    * feat: add checkbox rule
    
    * feat: handle Modal close event
    
    * feat: format code
    
    * feat: add page skip
    
    * feat: format code
    
    * merge
    
    * feat: clean code
    
    * fix: step4 error
    
    * feat: add edit modal
    
    * feat: add form validation
    
    * fix: step4 lose data
    
    * fix: step4 edit
    
    * add: WebSocket switch
    
    * feat: https methods list Validation
    
    * fix: timeout
    
    * clean code
    
    * add: redirect
    
    * fix: force https
    
    * add: redirect
    
    * fix: wrong redirectURI  typing
    
    * Update RequestConfigView.tsx
    
    * Update RequestConfigView.tsx
    
    * feat: change refirect
    
    * feat: operator to chinese
    
    * feat:change init timeout to 6000ms
    
    * fix: advancedMatchingRules data loss when edit
    
    * fix: advancedMatchingRules data loss when edit
    
    * fix: advancedMatchingRules table
    
    * feat: hide step2 step3 when use redirect
    
    * fix: handle actionBar
    
    * fix: redirect
    
    * feat: show port weight placeholder
    
    * feat: handle actionBar
    
    * feat: redirect
    
    * add: place holder
    
    * Update RequestConfigView.tsx
    
    * fix: wrong stepHeader when switch forceHttps
    
    * update
    
    Co-authored-by: 琚致远 <ju...@apache.org>
---
 src/pages/Routes/Create.tsx                 | 6 ++++++
 src/pages/Routes/components/Step1/index.tsx | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/src/pages/Routes/Create.tsx b/src/pages/Routes/Create.tsx
index cde7762..f759833 100644
--- a/src/pages/Routes/Create.tsx
+++ b/src/pages/Routes/Create.tsx
@@ -57,6 +57,12 @@ const Create: React.FC = (props) => {
     }
 
     if (step1Data.redirectURI !== '') {
+      if (step1Data.forceHttps) {
+        setStep1Data({ ...step1Data, redirectURI: '' });
+        setRedirect(false);
+        setStepHeader(STEP_HEADER_4);
+        return;
+      }
       setRedirect(true);
       setStepHeader(STEP_HEADER_2);
     } else {
diff --git a/src/pages/Routes/components/Step1/index.tsx b/src/pages/Routes/components/Step1/index.tsx
index 92b9e81..0c284e6 100644
--- a/src/pages/Routes/components/Step1/index.tsx
+++ b/src/pages/Routes/components/Step1/index.tsx
@@ -23,6 +23,9 @@ const Step1: React.FC<Props> = (props) => {
         layout="horizontal"
         className={styles.stepForm}
         onValuesChange={(field) => {
+          if (field.forceHttps) {
+            form.setFieldsValue({ redirectURI: '' });
+          }
           onChange({ ...data.step1Data, ...field });
         }}
         initialValues={data.step1Data}