Skip to content

Commit 3d3dabc

Browse files
committed
[Feature][Engine UI] merge
2 parents 2fa603f + 6f38b56 commit 3d3dabc

File tree

5 files changed

+129
-2
lines changed

5 files changed

+129
-2
lines changed

.github/workflows/build_main.yml

+5
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,8 @@ jobs:
3030
packages: write
3131
name: Run
3232
uses: ./.github/workflows/backend.yml
33+
call-ui:
34+
name: Run UI Workflow
35+
uses: ./.github/workflows/ui.yml
36+
permissions:
37+
packages: write

.github/workflows/ui.yml

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the 'License'); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an 'AS IS' BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name: Frontend
17+
18+
on:
19+
workflow_call:
20+
21+
concurrency:
22+
group: frontend-${{ github.event.pull_request.number || github.ref }}
23+
cancel-in-progress: true
24+
25+
jobs:
26+
code-style:
27+
name: Code Style Check
28+
runs-on: ubuntu-latest
29+
timeout-minutes: 10
30+
steps:
31+
- uses: actions/checkout@v3
32+
with:
33+
submodules: true
34+
- name: Install Dependencies
35+
run: |
36+
cd ./seatunnel-engine/seatunnel-ui
37+
npm install
38+
- name: Check Code Style
39+
run: |
40+
cd ./seatunnel-engine/seatunnel-ui
41+
npm run lint
42+
43+
sanity-check:
44+
name: Sanity Check
45+
needs: [ code-style ]
46+
runs-on: ubuntu-latest
47+
timeout-minutes: 10
48+
steps:
49+
- name: Verify Results
50+
run: |
51+
[[ ${{ needs.code-style.result }} == 'success' ]] || exit 1;
52+
53+
changes:
54+
runs-on: ubuntu-latest
55+
timeout-minutes: 10
56+
outputs:
57+
frontend-modules: ${{ steps.filter.outputs.modules }}
58+
steps:
59+
- uses: actions/checkout@v4
60+
with:
61+
fetch-depth: '2000'
62+
- name: Check File Changes
63+
id: filter
64+
run: |
65+
# Navigate to the frontend directory
66+
cd seatunnel/seatunnel-engine/seatunnel-ui
67+
68+
# Use git to find changed files in the frontend directory
69+
git fetch origin
70+
CHANGED_FILES=$(git diff --name-only origin/main...HEAD | grep "^seatunnel/seatunnel-engine/seatunnel-ui/")
71+
72+
# If there are changes, list the affected modules
73+
if [ -n "$CHANGED_FILES" ]; then
74+
echo "modules=true" >> $GITHUB_OUTPUT
75+
else
76+
echo "modules=false" >> $GITHUB_OUTPUT
77+
fi
78+
79+
unit-test:
80+
needs: [ changes, sanity-check ]
81+
if: needs.changes.outputs.frontend-modules == 'true'
82+
runs-on: ubuntu-latest
83+
strategy:
84+
matrix:
85+
node-version: [16.x, 18.x]
86+
timeout-minutes: 60
87+
steps:
88+
- uses: actions/checkout@v3
89+
- name: Set up Node.js ${{ matrix.node-version }}
90+
uses: actions/setup-node@v3
91+
with:
92+
node-version: ${{ matrix.node-version }}
93+
cache: 'npm'
94+
- name: Install Dependencies
95+
run: |
96+
cd ./seatunnel-engine/seatunnel-ui
97+
npm ci
98+
- name: Run Unit Tests
99+
run: |
100+
cd ./seatunnel-engine/seatunnel-ui
101+
npm test

seatunnel-engine/seatunnel-engine-server/pom.xml

+5
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@
3333
<artifactId>seatunnel-engine-core</artifactId>
3434
<version>${project.version}</version>
3535
</dependency>
36+
<dependency>
37+
<groupId>org.apache.seatunnel</groupId>
38+
<artifactId>seatunnel-engine-ui</artifactId>
39+
<version>${project.version}</version>
40+
</dependency>
3641
<dependency>
3742
<groupId>org.apache.seatunnel</groupId>
3843
<artifactId>checkpoint-storage-hdfs</artifactId>

seatunnel-engine/seatunnel-engine-ui/pom.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
<version>${revision}</version>
2828
</parent>
2929
<artifactId>seatunnel-engine-ui</artifactId>
30-
<packaging>pom</packaging>
3130
<name>SeaTunnel : Engine : UI</name>
3231

3332
<properties>
@@ -95,7 +94,7 @@
9594
<goals>
9695
<goal>npm</goal>
9796
</goals>
98-
<phase>install</phase>
97+
<phase>package</phase>
9998
<configuration>
10099
<arguments>run build</arguments>
101100
</configuration>

seatunnel-engine/seatunnel-engine-ui/src/components/configuration/index.tsx

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
118
import { NCard, NDescriptions, NDescriptionsItem, NSpace } from 'naive-ui'
219
import { defineComponent, type PropType } from 'vue'
320

0 commit comments

Comments
 (0)