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

kriszu pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git


The following commit(s) were added to refs/heads/dev by this push:
     new 3854563ad Fixed the issue that SSO could not jump when debugging the 
front-end and backend separation locally (#3658)
3854563ad is described below

commit 3854563ad1af99b2abdadf4ea4c9b8585931d3dd
Author: yangzehan <[email protected]>
AuthorDate: Wed Apr 10 09:33:08 2024 +0800

    Fixed the issue that SSO could not jump when debugging the front-end and 
backend separation locally (#3658)
    
    修复sso在本地调试前后端分离时无法跳转
---
 streampark-console/streampark-console-webapp/.env.development          | 2 ++
 .../streampark-console-webapp/src/views/base/login/LoginForm.vue       | 3 ++-
 streampark-console/streampark-console-webapp/types/global.d.ts         | 1 +
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/streampark-console/streampark-console-webapp/.env.development 
b/streampark-console/streampark-console-webapp/.env.development
index 22212177f..ea2a9e87e 100644
--- a/streampark-console/streampark-console-webapp/.env.development
+++ b/streampark-console/streampark-console-webapp/.env.development
@@ -20,6 +20,8 @@ VITE_PUBLIC_PATH=/
 # Please note that no line breaks
 VITE_PROXY=[["/basic-api","http://localhost:10000";]]
 
+VITE_BASE_ADDRESS=http://localhost:10000
+
 # Delete console
 VITE_DROP_CONSOLE=false
 
diff --git 
a/streampark-console/streampark-console-webapp/src/views/base/login/LoginForm.vue
 
b/streampark-console/streampark-console-webapp/src/views/base/login/LoginForm.vue
index a2cd069a3..ca3bc116a 100644
--- 
a/streampark-console/streampark-console-webapp/src/views/base/login/LoginForm.vue
+++ 
b/streampark-console/streampark-console-webapp/src/views/base/login/LoginForm.vue
@@ -68,7 +68,7 @@
     </FormItem>
 
     <FormItem class="enter-x text-left">
-      <Button :href="SSO_LOGIN_PATH" type="link" v-if="enableSSO">
+      <Button :href="BASE_ADDRESS+SSO_LOGIN_PATH" type="link" v-if="enableSSO">
         {{ t('sys.login.ssoSignIn') }}
       </Button>
       <Button type="link" class="float-right" @click="changeLoginType" 
v-if="enableLDAP">
@@ -117,6 +117,7 @@
     account: string;
     password: string;
   }
+  const BASE_ADDRESS= import.meta.env.VITE_BASE_ADDRESS;
   const formRef = ref();
   const loading = ref(false);
   const userId = ref('');
diff --git a/streampark-console/streampark-console-webapp/types/global.d.ts 
b/streampark-console/streampark-console-webapp/types/global.d.ts
index 049ef55af..045faf6fb 100644
--- a/streampark-console/streampark-console-webapp/types/global.d.ts
+++ b/streampark-console/streampark-console-webapp/types/global.d.ts
@@ -62,6 +62,7 @@ declare global {
     VITE_USE_PWA: boolean;
     VITE_PUBLIC_PATH: string;
     VITE_PROXY: [string, string][];
+    VITE_BASE_ADDRESS : string;
     VITE_GLOB_APP_TITLE: string;
     VITE_GLOB_APP_SHORT_NAME: string;
     VITE_USE_CDN: boolean;

Reply via email to