Loading escheduler-api/src/main/java/cn/escheduler/api/configuration/AppConfiguration.java +7 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ public class AppConfiguration implements WebMvcConfigurer { //i18n registry.addInterceptor(localeChangeInterceptor()); registry.addInterceptor(loginInterceptor()).addPathPatterns(LOGIN_INTERCEPTOR_PATH_PATTERN).excludePathPatterns(LOGIN_PATH_PATTERN,"/swagger-resources/**", "/webjars/**", "/v2/**", "/doc.html", "*.html"); registry.addInterceptor(loginInterceptor()).addPathPatterns(LOGIN_INTERCEPTOR_PATH_PATTERN).excludePathPatterns(LOGIN_PATH_PATTERN,"/swagger-resources/**", "/webjars/**", "/v2/**", "/doc.html", "*.html", "/ui/**"); } Loading @@ -87,6 +87,12 @@ public class AppConfiguration implements WebMvcConfigurer { registry.addResourceHandler("/ui/**").addResourceLocations("file:ui/"); } @Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/ui/").setViewName("forward:/ui/index.html"); registry.addViewController("/").setViewName("forward:/ui/index.html"); } @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping(PATH_PATTERN).allowedOrigins("*").allowedMethods("*"); Loading escheduler-ui/build/config.js +5 −1 Original line number Diff line number Diff line Loading @@ -189,11 +189,15 @@ const baseConfig = { }, plugins: [ new webpack.ProvidePlugin({ vue: 'Vue', _: 'lodash' }), new webpack.DefinePlugin({ PUBLIC_PATH: JSON.stringify(process.env.PUBLIC_PATH ? process.env.PUBLIC_PATH : '') }), new HtmlWebpackExtPlugin({ cache: true, delimiter: '$', locals: { NODE_ENV:isProduction NODE_ENV:isProduction, PUBLIC_PATH: process.env.PUBLIC_PATH ? process.env.PUBLIC_PATH : '' } }), ...pages Loading escheduler-ui/package.json +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ "lint:fix": "standard \"**/*.{js,vue}\" --fix", "start": "npm run dev", "combo": "node ./build/combo.js", "build:combined": "npm run clean && cross-env NODE_ENV=production webpack --config ./build/webpack.config.combined.js" "build:combined": "npm run clean && cross-env NODE_ENV=production PUBLIC_PATH=/escheduler/ui webpack --config ./build/webpack.config.combined.js" }, "dependencies": { "autoprefixer": "^9.1.0", Loading escheduler-ui/src/js/conf/home/store/user/actions.js +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ export default { signOut () { io.post(`signOut`, res => { setTimeout(() => { window.location.href = '/view/login/index.html' window.location.href = `${PUBLIC_PATH}/view/login/index.html` }, 100) }).catch(e => { console.log(e) Loading escheduler-ui/src/js/conf/login/App.vue +2 −2 Original line number Diff line number Diff line Loading @@ -69,9 +69,9 @@ setTimeout(() => { this.spinnerLoading = false if (this.userName === 'admin') { window.location.href = '/#/security/tenant' window.location.href = `${PUBLIC_PATH}/#/security/tenant` } else { window.location.href = '/#/home' window.location.href = `${PUBLIC_PATH}/#/home` } }, 1000) }).catch(e => { Loading Loading
escheduler-api/src/main/java/cn/escheduler/api/configuration/AppConfiguration.java +7 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ public class AppConfiguration implements WebMvcConfigurer { //i18n registry.addInterceptor(localeChangeInterceptor()); registry.addInterceptor(loginInterceptor()).addPathPatterns(LOGIN_INTERCEPTOR_PATH_PATTERN).excludePathPatterns(LOGIN_PATH_PATTERN,"/swagger-resources/**", "/webjars/**", "/v2/**", "/doc.html", "*.html"); registry.addInterceptor(loginInterceptor()).addPathPatterns(LOGIN_INTERCEPTOR_PATH_PATTERN).excludePathPatterns(LOGIN_PATH_PATTERN,"/swagger-resources/**", "/webjars/**", "/v2/**", "/doc.html", "*.html", "/ui/**"); } Loading @@ -87,6 +87,12 @@ public class AppConfiguration implements WebMvcConfigurer { registry.addResourceHandler("/ui/**").addResourceLocations("file:ui/"); } @Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/ui/").setViewName("forward:/ui/index.html"); registry.addViewController("/").setViewName("forward:/ui/index.html"); } @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping(PATH_PATTERN).allowedOrigins("*").allowedMethods("*"); Loading
escheduler-ui/build/config.js +5 −1 Original line number Diff line number Diff line Loading @@ -189,11 +189,15 @@ const baseConfig = { }, plugins: [ new webpack.ProvidePlugin({ vue: 'Vue', _: 'lodash' }), new webpack.DefinePlugin({ PUBLIC_PATH: JSON.stringify(process.env.PUBLIC_PATH ? process.env.PUBLIC_PATH : '') }), new HtmlWebpackExtPlugin({ cache: true, delimiter: '$', locals: { NODE_ENV:isProduction NODE_ENV:isProduction, PUBLIC_PATH: process.env.PUBLIC_PATH ? process.env.PUBLIC_PATH : '' } }), ...pages Loading
escheduler-ui/package.json +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ "lint:fix": "standard \"**/*.{js,vue}\" --fix", "start": "npm run dev", "combo": "node ./build/combo.js", "build:combined": "npm run clean && cross-env NODE_ENV=production webpack --config ./build/webpack.config.combined.js" "build:combined": "npm run clean && cross-env NODE_ENV=production PUBLIC_PATH=/escheduler/ui webpack --config ./build/webpack.config.combined.js" }, "dependencies": { "autoprefixer": "^9.1.0", Loading
escheduler-ui/src/js/conf/home/store/user/actions.js +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ export default { signOut () { io.post(`signOut`, res => { setTimeout(() => { window.location.href = '/view/login/index.html' window.location.href = `${PUBLIC_PATH}/view/login/index.html` }, 100) }).catch(e => { console.log(e) Loading
escheduler-ui/src/js/conf/login/App.vue +2 −2 Original line number Diff line number Diff line Loading @@ -69,9 +69,9 @@ setTimeout(() => { this.spinnerLoading = false if (this.userName === 'admin') { window.location.href = '/#/security/tenant' window.location.href = `${PUBLIC_PATH}/#/security/tenant` } else { window.location.href = '/#/home' window.location.href = `${PUBLIC_PATH}/#/home` } }, 1000) }).catch(e => { Loading