Skip to content

Commit f375d9f

Browse files
authored
Update frontend
Angular 18 and Node 22
1 parent 5519549 commit f375d9f

27 files changed

Lines changed: 13688 additions & 10370 deletions

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Set up Node.js
1515
uses: actions/setup-node@v3
1616
with:
17-
node-version: '12.13.0'
17+
node-version: '22.21.0'
1818

1919
- name: Set up Go
2020
uses: actions/setup-go@v4

.idea/.gitignore

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/engarde.iml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build-scripts/build.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,20 @@ fi
1010
if [ "$GITHUB_REF" != "" ]; then
1111
commit=$(echo "$GITHUB_SHA" | head -c 7);
1212
branch=${GITHUB_REF#refs/heads/};
13-
version="$commit ($branch)"
13+
if [ "$branch" = "master" ]; then
14+
version="$commit"
15+
else
16+
version="$commit ($branch)"
17+
fi
1418
elif [ $(which git) != "" ]; then
1519
commit=$(git rev-parse HEAD | head -c 7);
1620
branch=$(git rev-parse --abbrev-ref HEAD);
17-
version="$commit ($branch) - UNOFFICIAL BUILD"
21+
if [ "$branch" = "master" ]; then
22+
version="$commit"
23+
else
24+
version="$commit ($branch)"
25+
fi
26+
version="$version - UNOFFICIAL BUILD"
1827
else
1928
version="UNOFFICIAL BUILD"
2029
fi

cmd/engarde-client/webserver.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func webInclude(w http.ResponseWriter, r *http.Request) {
177177
return
178178
}
179179
var rsp []byte
180-
if(isExcluded(req.Iface)) {
180+
if isExcluded(req.Iface) {
181181
swapExclusion(req.Iface)
182182
rsp, err = json.Marshal(struct {
183183
Status string `json:"status"`
@@ -213,7 +213,7 @@ func webExclude(w http.ResponseWriter, r *http.Request) {
213213
return
214214
}
215215
var rsp []byte
216-
if(!isExcluded(req.Iface)) {
216+
if !isExcluded(req.Iface) {
217217
swapExclusion(req.Iface)
218218
rsp, err = json.Marshal(struct {
219219
Status string `json:"status"`
@@ -235,7 +235,7 @@ func webExclude(w http.ResponseWriter, r *http.Request) {
235235
func webserver(listenAddr, username, password string) {
236236
for {
237237
realm := "engarde"
238-
box := packr.New("webmanager", "../../webmanager/dist/webmanager")
238+
box := packr.New("webmanager", "../../webmanager/dist/webmanager/browser")
239239
http.HandleFunc("/", webBasicAuth(webHandleFileServer(box, "/"), username, password, realm))
240240
http.HandleFunc("/api/v1/get-list", NoCache(webBasicAuth(webGetList, username, password, realm)))
241241
http.HandleFunc("/api/v1/include", NoCache(webBasicAuth(webInclude, username, password, realm)))

cmd/engarde-server/webserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func webGetList(w http.ResponseWriter, r *http.Request) {
8383
func webserver(listenAddr, username, password string) {
8484
for {
8585
realm := "engarde"
86-
box := packr.New("webmanager", "../../webmanager/dist/webmanager")
86+
box := packr.New("webmanager", "../../webmanager/dist/webmanager/browser")
8787
http.HandleFunc("/", webBasicAuth(webHandleFileServer(box, "/"), username, password, realm))
8888
http.HandleFunc("/api/v1/get-list", NoCache(webBasicAuth(webGetList, username, password, realm)))
8989
log.Info("Management webserver listening on " + listenAddr)

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)