Skip to content

Commit 314f84d

Browse files
kalencayawangqi
and
wangqi
authored
[Feature][scaleph-ui-react] refactor project sub menu routes (#694)
* feature: refactor scaleph-ui-react * feature: upgrade github actions version * feature: upgrade github actions version * feature: update routes * feature: update routes * feature: update routes * feature: update routes * feature: update routes --------- Co-authored-by: wangqi <[email protected]>
1 parent 5b13743 commit 314f84d

File tree

835 files changed

+6711
-6720
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

835 files changed

+6711
-6720
lines changed

.github/workflows/ci-docker-build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ jobs:
5353
timeout-minutes: 360
5454
steps:
5555
- name: Checkout
56-
uses: actions/checkout@v3
56+
uses: actions/checkout@v4
5757
with:
58-
fetch-depth: 0
58+
fetch-depth: 1
5959
- name: Set up QEMU
6060
uses: docker/setup-qemu-action@v2
6161
with:

.github/workflows/ci-maven.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ jobs:
3535
runs-on: ${{ matrix.os }}
3636
steps:
3737
- name: checkout
38-
uses: actions/checkout@v3
38+
uses: actions/checkout@v4
3939
with:
40-
fetch-depth: 0
40+
fetch-depth: 1
4141
- name: Setup Java JDK ${{ matrix.jdk }}
42-
uses: actions/setup-java@v3
42+
uses: actions/setup-java@v4
4343
with:
4444
java-version: ${{ matrix.jdk }}
4545
distribution: temurin
@@ -51,7 +51,7 @@ jobs:
5151
timeout-minutes: 360
5252
run: mvn -B -U -T 4C clean package
5353
- name: Upload coverage to Codecov
54-
uses: codecov/codecov-action@v3
54+
uses: codecov/codecov-action@v4
5555
with:
5656
token: ${{ secrets.CODECOV_TOKEN }}
5757
file: ./**/target/site/jacoco/jacoco.xml

.github/workflows/ci-npm.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ jobs:
3434
runs-on: ${{ matrix.os }}
3535
steps:
3636
- name: checkout
37-
uses: actions/checkout@v3
37+
uses: actions/checkout@v4
3838
with:
39-
fetch-depth: 0
39+
fetch-depth: 1
4040
- name: Build scaleph-ui-react-dist
4141
run: mvn -B -U package -pl scaleph-ui-react -am -DskipTests
4242
- name: Build with NPM

.github/workflows/release-dist-bin.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ jobs:
3232
steps:
3333
- id: checkout
3434
name: Checkout Codes
35-
uses: actions/checkout@v3
35+
uses: actions/checkout@v4
3636
- id: prepare_jdk
3737
name: Prepare JDK 17
38-
uses: actions/setup-java@v3
38+
uses: actions/setup-java@v4
3939
with:
4040
distribution: temurin
4141
java-version: 17

.github/workflows/release-manual-docker-flink-cdc.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ jobs:
4747
timeout-minutes: 360
4848
steps:
4949
- name: Checkout
50-
uses: actions/checkout@v3
50+
uses: actions/checkout@v4
5151
with:
52-
fetch-depth: 0
52+
fetch-depth: 1
5353
- name: Log in to the Container registry
5454
uses: docker/[email protected]
5555
with:

.github/workflows/release-manual-docker-flink.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ jobs:
4040
timeout-minutes: 30
4141
steps:
4242
- name: Checkout
43-
uses: actions/checkout@v3
43+
uses: actions/checkout@v4
4444
with:
45-
fetch-depth: 0
45+
fetch-depth: 1
4646
- name: Log in to the Container registry
4747
uses: docker/[email protected]
4848
with:

.github/workflows/release-manual-docker-seatunnel.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ jobs:
4747
timeout-minutes: 360
4848
steps:
4949
- name: Checkout
50-
uses: actions/checkout@v3
50+
uses: actions/checkout@v4
5151
with:
52-
fetch-depth: 0
52+
fetch-depth: 1
5353
- name: Log in to the Container registry
5454
uses: docker/[email protected]
5555
with:

.github/workflows/release-manual-docker-sql-template.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ jobs:
4040
timeout-minutes: 30
4141
steps:
4242
- name: Checkout
43-
uses: actions/checkout@v3
43+
uses: actions/checkout@v4
4444
with:
45-
fetch-depth: 0
45+
fetch-depth: 1
4646
- name: Setup Java JDK 11
4747
uses: actions/setup-java@v3
4848
with:

.github/workflows/release-master-docker-scaleph.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ jobs:
3939
timeout-minutes: 360
4040
steps:
4141
- name: Checkout
42-
uses: actions/checkout@v3
42+
uses: actions/checkout@v4
4343
with:
44-
fetch-depth: 0
44+
fetch-depth: 1
4545
- name: Log in to the Container registry
4646
uses: docker/[email protected]
4747
with:

.github/workflows/release-tag-docker-scaleph.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ jobs:
3737
timeout-minutes: 360
3838
steps:
3939
- name: Checkout
40-
uses: actions/checkout@v3
40+
uses: actions/checkout@v4
4141
with:
42-
fetch-depth: 0
42+
fetch-depth: 1
4343
- name: Log in to the Container registry
4444
uses: docker/[email protected]
4545
with:

.github/workflows/sonarcloud.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ jobs:
3131
runs-on: ubuntu-latest
3232
steps:
3333
- name: checkout
34-
uses: actions/checkout@v3
34+
uses: actions/checkout@v4
3535
with:
36-
fetch-depth: 0
36+
fetch-depth: 1
3737
- name: Setup Java JDK
38-
uses: actions/setup-java@v3
38+
uses: actions/setup-java@v4
3939
with:
4040
java-version: 11
4141
distribution: adopt

pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,10 @@
162162
<akka.version>2.6.21</akka.version>
163163
<protobuf.version>3.21.5</protobuf.version>
164164
<netty.version>4.1.82.Final</netty.version>
165-
<flink.version>1.18.0</flink.version>
166-
<flink.base.version>1.17</flink.base.version>
167-
<flink-jdbc.version>3.1.1</flink-jdbc.version>
168-
<paimon.version>0.5.0-incubating</paimon.version>
165+
<flink.version>1.18.1</flink.version>
166+
<flink.base.version>1.18</flink.base.version>
167+
<flink-jdbc.version>3.1.2</flink-jdbc.version>
168+
<paimon.version>0.7.0-incubating</paimon.version>
169169
<kubernetes.client.version>6.2.0</kubernetes.client.version>
170170
<spring-cloud-openfeign.version>3.1.7</spring-cloud-openfeign.version>
171171
<zjsonpatch.version>0.4.14</zjsonpatch.version>

scaleph-ui-react/.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PORT=8000
File renamed without changes.
File renamed without changes.

scaleph-ui-react/config/config.ts

+103-49
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,120 @@
11
// https://umijs.org/config/
2-
import {defineConfig} from '@umijs/max';
3-
import defaultSettings from './defaultSettings';
4-
import proxy from './proxy';
5-
import routes from './routes';
2+
import { defineConfig } from "@umijs/max";
3+
import defaultSettings from "./defaultSettings";
4+
import proxy from "./proxy";
5+
import routes from "./routes";
66

7-
const {REACT_APP_ENV} = process.env;
7+
const { REACT_APP_ENV = "dev" } = process.env;
88

99
export default defineConfig({
10-
publicPath: REACT_APP_ENV === 'dist' ? '/scaleph/ui/' : '/',
11-
outputPath: REACT_APP_ENV === 'dist' ? 'dist-bin' : 'dist',
12-
history: {
13-
type: 'hash'
14-
},
10+
/**
11+
* @name 开启 hash 模式
12+
* @description 让 build 之后的产物包含 hash 后缀。通常用于增量发布和避免浏览器加载缓存。
13+
* @doc https://umijs.org/docs/api/config#hash
14+
*/
1515
hash: true,
16-
antd: {},
17-
request: {},
18-
initialState: {},
16+
17+
/**
18+
* @name 兼容性设置
19+
* @description 设置 ie11 不一定完美兼容,需要检查自己使用的所有依赖
20+
* @doc https://umijs.org/docs/api/config#targets
21+
*/
22+
// targets: {
23+
// ie: 11,
24+
// },
25+
/**
26+
* @name 路由的配置,不在路由中引入的文件不会编译
27+
* @description 只支持 path,component,routes,redirect,wrappers,title 的配置
28+
* @doc https://umijs.org/docs/guides/routes
29+
*/
30+
// umi routes: https://umijs.org/docs/routing
31+
routes,
32+
/**
33+
* @name 主题的配置
34+
* @description 虽然叫主题,但是其实只是 less 的变量设置
35+
* @doc antd的主题设置 https://ant.design/docs/react/customize-theme-cn
36+
* @doc umi 的theme 配置 https://umijs.org/docs/api/config#theme
37+
*/
38+
theme: {
39+
// 如果不想要 configProvide 动态设置主题需要把这个设置为 default
40+
// 只有设置为 variable, 才能使用 configProvide 动态设置主色调
41+
"root-entry-name": "variable",
42+
},
43+
/**
44+
* @name moment 的国际化配置
45+
* @description 如果对国际化没有要求,打开之后能减少js的包大小
46+
* @doc https://umijs.org/docs/api/config#ignoremomentlocale
47+
*/
48+
ignoreMomentLocale: true,
49+
/**
50+
* @name 代理配置
51+
* @description 可以让你的本地服务器代理到你的服务器上,这样你就可以访问服务器的数据了
52+
* @see 要注意以下 代理只能在本地开发时使用,build 之后就无法使用了。
53+
* @doc 代理介绍 https://umijs.org/docs/guides/proxy
54+
* @doc 代理配置 https://umijs.org/docs/api/config#proxy
55+
*/
56+
proxy: proxy[REACT_APP_ENV as keyof typeof proxy],
57+
/**
58+
* @name 快速热更新配置
59+
* @description 一个不错的热更新组件,更新时可以保留 state
60+
*/
61+
fastRefresh: true,
62+
//============== 以下都是max的插件配置 ===============
63+
/**
64+
* @name 数据流插件
65+
* @@doc https://umijs.org/docs/max/data-flow
66+
*/
1967
model: {},
68+
dva: {},
69+
/**
70+
* 一个全局的初始数据流,可以用它在插件之间共享数据
71+
* @description 可以用来存放一些全局的数据,比如用户信息,或者一些全局的状态,全局初始状态在整个 Umi 项目的最开始创建。
72+
* @doc https://umijs.org/docs/max/data-flow#%E5%85%A8%E5%B1%80%E5%88%9D%E5%A7%8B%E7%8A%B6%E6%80%81
73+
*/
74+
initialState: {},
75+
/**
76+
* @name layout 插件
77+
* @doc https://umijs.org/docs/max/layout-menu
78+
*/
2079
layout: {
21-
// https://umijs.org/zh-CN/plugins/plugin-layout
2280
locale: true,
23-
siderWidth: 208,
2481
...defaultSettings,
2582
},
26-
// https://umijs.org/zh-CN/plugins/plugin-locale
83+
/**
84+
* @name 国际化插件
85+
* @doc https://umijs.org/docs/max/i18n
86+
*/
2787
locale: {
28-
default: 'zh-CN',
88+
// default zh-CN
89+
default: "zh-CN",
2990
antd: true,
30-
title: true,
91+
// default true, when it is true, will use `navigator.language` overwrite default
3192
baseNavigator: true,
32-
baseSeparator: '-',
3393
},
34-
35-
targets: {
36-
chrome: '86',
37-
},
38-
// umi routes: https://umijs.org/docs/routing
39-
routes,
94+
/**
95+
* @name antd 插件
96+
* @description 内置了 babel import 插件
97+
* @doc https://umijs.org/docs/max/antd#antd
98+
*/
99+
antd: {},
100+
/**
101+
* @name 网络请求配置
102+
* @description 它基于 axios 和 ahooks 的 useRequest 提供了一套统一的网络请求和错误处理方案。
103+
* @doc https://umijs.org/docs/max/request
104+
*/
105+
request: {},
106+
/**
107+
* @name 权限插件
108+
* @description 基于 initialState 的权限插件,必须先打开 initialState
109+
* @doc https://umijs.org/docs/max/access
110+
*/
40111
access: {},
41-
// Theme for antd: https://ant.design/docs/react/customize-theme-cn
42-
theme: {
43-
// 如果不想要 configProvide 动态设置主题需要把这个设置为 default
44-
// 只有设置为 variable, 才能使用 configProvide 动态设置主色调
45-
// https://ant.design/docs/react/customize-theme-variable-cn
46-
'root-entry-name': 'variable',
47-
},
48-
ignoreMomentLocale: true,
49-
proxy: proxy[REACT_APP_ENV || 'dev'],
50-
manifest: {
51-
basePath: '/',
112+
icons: {},
113+
//================ pro 插件配置 =================
114+
presets: ["umi-presets-pro"],
115+
mfsu: {
116+
strategy: "normal",
52117
},
53-
// Fast Refresh 热更新
54-
fastRefresh: true,
55-
presets: ['umi-presets-pro'],
56-
dva: {}
57-
// openAPI: [
58-
// {
59-
// requestLibPath: "import { request } from '@umijs/max'",
60-
// schemaPath: 'https://gw.alipayobjects.com/os/antfincdn/CA1dOm%2631B/openapi.json',
61-
// projectName: 'swagger',
62-
// },
63-
// ],
118+
requestRecord: {},
119+
esbuildMinifyIIFE: true,
64120
});
65-
66-
+12-8
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
1-
import { Settings as LayoutSettings } from '@ant-design/pro-components';
1+
import { Settings as LayoutSettings } from "@ant-design/pro-components";
22

33
const {PUBLIC_PATH} = process.env;
44
const baseURL = PUBLIC_PATH ?
55
(PUBLIC_PATH.endsWith("/") ? PUBLIC_PATH.substring(0, PUBLIC_PATH.length - 1) : PUBLIC_PATH)
66
: ''
77

8+
/**
9+
* @name
10+
*/
811
const Settings: LayoutSettings & {
912
pwa?: boolean;
1013
logo?: string;
1114
} = {
12-
navTheme: 'light',
13-
primaryColor: '#1890ff',
14-
layout: 'mix',
15-
contentWidth: 'Fluid',
15+
navTheme: "light",
16+
colorPrimary: "#1890ff",
17+
layout: "mix",
18+
contentWidth: "Fluid",
1619
fixedHeader: true,
1720
fixSiderbar: true,
1821
colorWeak: false,
19-
splitMenus: true,
20-
title: 'Scaleph',
22+
title: "Scaleph",
2123
pwa: false,
2224
logo: `${baseURL}/scaleph.svg`,
23-
iconfontUrl: '',
25+
iconfontUrl: "",
26+
splitMenus: true,
27+
siderMenuType: "sub",
2428
};
2529

2630
export default Settings;

0 commit comments

Comments
 (0)