Skip to content

Commit e481800

Browse files
authored
Merge pull request #107 from OneLiteFeatherNET/feat/webinterface
Feat/webinterface
2 parents 24e299d + dbe2f69 commit e481800

Some content is hidden

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

74 files changed

+12729
-983
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ common/target/
66
codegen/target/
77
docs/
88
Makefile.toml
9+
dashboard/.nuxt/
10+
dashboard/.output/
11+
dashboard/node_modules/

.github/workflows/ci.yml

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,52 @@ on:
99
- main
1010

1111
jobs:
12+
dashboard_build:
13+
name: dashboard-build
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout sources
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: "22"
23+
24+
- name: Setup pnpm
25+
uses: pnpm/action-setup@v4
26+
with:
27+
version: 9
28+
29+
- name: Dashboard build
30+
run: make dashboard_build
31+
32+
lib_build:
33+
name: lib-build
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout sources
37+
uses: actions/checkout@v4
38+
39+
- name: Setup Node
40+
uses: actions/setup-node@v4
41+
with:
42+
node-version: "22"
43+
44+
- name: Setup pnpm
45+
uses: pnpm/action-setup@v4
46+
with:
47+
version: 9
48+
49+
- name: Lib build
50+
run: make lib_build
51+
1252
check:
1353
name: check
1454
runs-on: ubuntu-latest
1555
steps:
1656
- name: Install toolchain
17-
uses: actions-rs/toolchain@v1
18-
with:
19-
toolchain: nightly
20-
override: true
57+
uses: actions-rust-lang/setup-rust-toolchain@v1
2158

2259
- name: Checkout Sources
2360
uses: actions/checkout@v4
@@ -38,10 +75,8 @@ jobs:
3875
runs-on: ubuntu-latest
3976
steps:
4077
- name: Install toolchain
41-
uses: actions-rs/toolchain@v1
78+
uses: actions-rust-lang/setup-rust-toolchain@v1
4279
with:
43-
toolchain: nightly
44-
override: true
4580
components: clippy
4681
profile: minimal
4782

@@ -60,6 +95,7 @@ jobs:
6095
run: make clippy
6196

6297
test:
98+
needs: [clippy, check]
6399
name: tests
64100
runs-on: ubuntu-latest
65101
strategy:
@@ -68,10 +104,8 @@ jobs:
68104
test: [postgres, mysql, mariadb, mssql, unittest, distributed_caching]
69105
steps:
70106
- name: Install toolchain
71-
uses: actions-rs/toolchain@v1
107+
uses: actions-rust-lang/setup-rust-toolchain@v1
72108
with:
73-
toolchain: nightly
74-
override: true
75109
profile: minimal
76110

77111
- name: Checkout Sources

.github/workflows/lib.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
- name: Setup Node
1616
uses: actions/setup-node@v4
1717
with:
18-
node-version: "20"
18+
node-version: "22"
1919

2020
- name: Setup pnpm
2121
uses: pnpm/action-setup@v4
2222
with:
23-
version: 8
23+
version: 9
2424

2525
- name: Build
2626
run: make lib_build

.github/workflows/nightly.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ jobs:
1212
steps:
1313
- name: Install toolchain
1414
uses: actions-rs/toolchain@v1
15-
with:
16-
toolchain: nightly
17-
override: true
1815

1916
- name: Checkout Sources
2017
uses: actions/checkout@v4
@@ -35,10 +32,8 @@ jobs:
3532
runs-on: ubuntu-latest
3633
steps:
3734
- name: Install toolchain
38-
uses: actions-rs/toolchain@v1
35+
uses: actions-rust-lang/setup-rust-toolchain@v1
3936
with:
40-
toolchain: nightly
41-
override: true
4237
components: clippy
4338
profile: minimal
4439

@@ -57,6 +52,7 @@ jobs:
5752
run: make clippy
5853

5954
tests:
55+
needs: [clippy, check]
6056
name: tests
6157
runs-on: ubuntu-latest
6258
strategy:
@@ -65,10 +61,8 @@ jobs:
6561
test: [postgres, mysql, mariadb, mssql, unittest, distributed_caching]
6662
steps:
6763
- name: Install toolchain
68-
uses: actions-rs/toolchain@v1
64+
uses: actions-rust-lang/setup-rust-toolchain@v1
6965
with:
70-
toolchain: nightly
71-
override: true
7266
profile: minimal
7367

7468
- name: Checkout Sources
@@ -86,7 +80,7 @@ jobs:
8680
run: make ${{ matrix.test }}
8781

8882
docker:
89-
needs: [tests, clippy, check]
83+
needs: [tests]
9084
name: docker
9185
runs-on: ubuntu-latest
9286
steps:
@@ -107,9 +101,9 @@ jobs:
107101
push: true
108102
tags: ghcr.io/onelitefeathernet/feedback-fusion:nightly
109103

110-
integration:
104+
dashboard:
111105
needs: [docker]
112-
name: dockerize integration test
106+
name: docker
113107
runs-on: ubuntu-latest
114108
steps:
115109
- name: Checkout Sources
@@ -126,9 +120,9 @@ jobs:
126120
uses: docker/build-push-action@v6
127121
with:
128122
context: .
123+
file: ./dashboard/Dockerfile
129124
push: true
130-
file: tests/integration/Dockerfile
131-
tags: ghcr.io/onelitefeathernet/feedback-fusion-integration:nightly
125+
tags: ghcr.io/onelitefeathernet/feedback-fusion-dashboard:nightly
132126

133127
docs:
134128
needs: [docker]

.github/workflows/release.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Install toolchain
14-
uses: actions-rs/toolchain@v1
15-
with:
16-
toolchain: nightly
17-
override: true
14+
uses: actions-rust-lang/setup-rust-toolchain@v1
1815

1916
- name: Checkout Sources
2017
uses: actions/checkout@v4
@@ -35,10 +32,8 @@ jobs:
3532
runs-on: ubuntu-latest
3633
steps:
3734
- name: Install toolchain
38-
uses: actions-rs/toolchain@v1
35+
uses: actions-rust-lang/setup-rust-toolchain@v1
3936
with:
40-
toolchain: nightly
41-
override: true
4237
components: clippy
4338
profile: minimal
4439

@@ -57,6 +52,7 @@ jobs:
5752
run: make clippy
5853

5954
tests:
55+
needs: [clippy, check]
6056
name: tests
6157
runs-on: ubuntu-latest
6258
strategy:
@@ -65,10 +61,8 @@ jobs:
6561
test: [postgres, mysql, mariadb, mssql, unittest, distributed_caching]
6662
steps:
6763
- name: Install toolchain
68-
uses: actions-rs/toolchain@v1
64+
uses: actions-rust-lang/setup-rust-toolchain@v1
6965
with:
70-
toolchain: nightly
71-
override: true
7266
profile: minimal
7367

7468
- name: Checkout Sources
@@ -86,7 +80,7 @@ jobs:
8680
run: make ${{ matrix.test }}
8781

8882
docker:
89-
needs: [tests, clippy, check]
83+
needs: [tests]
9084
name: docker
9185
runs-on: ubuntu-latest
9286
steps:
@@ -112,19 +106,14 @@ jobs:
112106
push: true
113107
tags: ghcr.io/onelitefeathernet/feedback-fusion:${{env.VERSION}},ghcr.io/onelitefeathernet/feedback-fusion:latest
114108

115-
integration:
109+
dashboard:
116110
needs: [docker]
117-
name: dockerize integration test
111+
name: docker
118112
runs-on: ubuntu-latest
119113
steps:
120114
- name: Checkout Sources
121115
uses: actions/checkout@v4
122116

123-
- name: Extract version
124-
run: |
125-
VERSION=$(grep '^version = ' Cargo.toml | sed -E 's/version = "(.*)"/\1/')
126-
echo "VERSION=$VERSION" >> $GITHUB_ENV
127-
128117
- name: Login into repository
129118
uses: docker/login-action@v3
130119
with:
@@ -136,9 +125,9 @@ jobs:
136125
uses: docker/build-push-action@v6
137126
with:
138127
context: .
128+
file: ./dashboard/Dockerfile
139129
push: true
140-
file: tests/integration/Dockerfile
141-
tags: ghcr.io/onelitefeathernet/feedback-fusion-integration:${{env.VERSION}},ghcr.io/onelitefeathernet/feedback-fusion-integration:latest
130+
tags: ghcr.io/onelitefeathernet/feedback-fusion-dashboard:${{env.VERSION}},ghcr.io/onelitefeathernet/feedback-fusion-dashboard:latest
142131

143132
docs:
144133
needs: [docker]

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Generated by Cargo
22
# will have compiled files and executables
33
debug/
4-
target/
4+
/target/
5+
/codegen/target/
6+
/common/target/
57

68
# These are backup files generated by rustfmt
79
**/*.rs.bk

Dockerfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
FROM rust:slim as build
1+
FROM rust:slim AS build
2+
3+
RUN apt-get update \
4+
&& apt-get install libssl-dev protobuf-compiler libprotobuf-dev pkg-config -y --no-install-recommends \
5+
&& apt-get clean \
6+
&& rustup toolchain install stable \
7+
&& rustup default stable
28

39
ARG features=all-databases,otlp
410

@@ -9,12 +15,8 @@ COPY ./common ./common
915
COPY ./codegen ./codegen
1016
COPY ./src ./src
1117
COPY ./benches ./benches
12-
COPY ./rust-toolchain.toml .
1318

14-
RUN apt-get update \
15-
&& apt-get install libssl-dev protobuf-compiler libprotobuf-dev pkg-config -y --no-install-recommends \
16-
&& apt-get clean \
17-
&& cargo build --release --features $features
19+
RUN cargo build --release --features $features
1820

1921
FROM gcr.io/distroless/cc-debian12
2022

Makefile

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,53 @@
11
pnpm:
2-
cd ./lib && pnpm i
3-
cd ./docs && pnpm i
2+
pnpm i -C lib
3+
pnpm i -C docs
44

55
core_generate: pnpm
6-
cd ./lib && pnpm run protoc
6+
pnpm run -C lib protoc
77

88
docs: core_generate
9-
cd ./lib && pnpm run dev
9+
pnpm run -C lib dev
1010

1111
lib_build: core_generate
12-
cd ./lib && pnpm run build
12+
pnpm run -C lib build
13+
14+
helm_docs:
15+
cd charts/feedback-fusion && helm-docs
16+
cp charts/feedback-fusion/README.md docs/docs/deployment/helm.md
1317

1418
docs_build: lib_build
15-
cd ./docs && pnpm run docs:build
19+
cd ./docs && pnpm run -C lib docs:build
1620

1721
extract_translations: pnpm
18-
cd ./lib && pnpm run translations:extract
22+
pnpm run -C lib translations:extract
1923

2024
build_translations: pnpm
21-
cd ./lib && pnpm run translations:build
25+
pnpm run -C lib translations:build
26+
27+
# dashboard
28+
29+
dashboard_setup:
30+
pnpm i -C dashboard
31+
32+
dashboard_protoc: dashboard_setup
33+
pnpm run -C dashboard protoc
34+
35+
dashboard_build: lib_build dashboard_protoc
36+
pnpm run -C dashboard build
37+
38+
dashboard: cleanup docker_network oidc-server-mock postgres_database postgres_backend lib_build dashboard_protoc
39+
NUXT_PUBLIC_FEEDBACK_FUSION_ENDPOINT="http://localhost:8000" \
40+
FEEDBACK_FUSION_OIDC_PROVIDER_AUTHORIZATION_URL="http://localhost:5151/connect/authorize" \
41+
FEEDBACK_FUSION_OIDC_PROVIDER_TOKEN_URL="http://localhost:5151/connect/token" \
42+
FEEDBACK_FUSION_OIDC_CLIENT_ID="client" \
43+
FEEDBACK_FUSION_OIDC_CLIENT_SECRET="secret" \
44+
FEEDBACK_FUSION_OIDC_REDIRECT_URL="http://localhost:3000/auth/oidc/callback" \
45+
FEEDBACK_FUSION_OIDC_PROVIDER_DISCOVERY_URL="http://localhost:5151/.well-known/openid-configuration" \
46+
pnpm run -C dashboard dev
47+
${MAKE} cleanup
48+
49+
dashboard_lint: dashboard_protoc
50+
pnpm run -C dashboard lint
2251

2352
# linting
2453

0 commit comments

Comments
 (0)