Compare commits

...

16 Commits

Author SHA1 Message Date
Donald Zou
b355d72e0a Update version number 2025-12-12 06:58:52 +08:00
Donald Zou
ec9131ea10 Add status filter to job log query
The job log query now filters for entries where Status is 0 or 'false', improving the ability to retrieve logs with specific status values.
2025-12-11 07:31:14 +08:00
Daan Selen
6fee7da633 chore: fix bcrypt issue 2025-12-10 23:17:45 +01:00
DaanSelen
2e8d2fe400 chore: bump WGDashboard version 2025-12-10 22:59:35 +01:00
DaanSelen
da3c34c250 chore: rename workflow
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Docker Build and Push / docker_build (push) Has been cancelled
Docker Build and Push / docker_scan (push) Has been cancelled
2025-12-10 12:19:25 +01:00
dependabot[bot]
d864d12793 build(deps): bump @vue/language-server in /src/static/app (#1019)
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Docker Build and Push / docker_build (push) Has been cancelled
Docker Build and Push / docker_scan (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Bumps [@vue/language-server](https://github.com/vuejs/language-tools/tree/HEAD/packages/language-server) from 3.1.3 to 3.1.7.
- [Release notes](https://github.com/vuejs/language-tools/releases)
- [Changelog](https://github.com/vuejs/language-tools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vuejs/language-tools/commits/v3.1.7/packages/language-server)

---
updated-dependencies:
- dependency-name: "@vue/language-server"
  dependency-version: 3.1.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-09 13:36:19 +01:00
DaanSelen
36390a4d71 refac: rework tailing of logs in the Docker entrypoint (#1021)
* chore: add debug workflow

* chore: testing fix

* chore: try next option

* refac: tailing logs

---------

Co-authored-by: DaanSelen <dselen@systemec.nl>
2025-12-09 13:16:18 +01:00
DaanSelen
5db2baf1dc fix sed command for armv7 2025-12-09 10:18:39 +01:00
DaanSelen
dc10da607d chore: bump codeql 2025-12-09 10:06:27 +01:00
dependabot[bot]
9b4abf19fa build(deps): bump @vueuse/shared in /src/static/app (#1015)
Bumps [@vueuse/shared](https://github.com/vueuse/vueuse/tree/HEAD/packages/shared) from 14.0.0 to 14.1.0.
- [Release notes](https://github.com/vueuse/vueuse/releases)
- [Commits](https://github.com/vueuse/vueuse/commits/v14.1.0/packages/shared)

---
updated-dependencies:
- dependency-name: "@vueuse/shared"
  dependency-version: 14.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-09 09:55:57 +01:00
dependabot[bot]
bf823e6cf8 build(deps): bump @volar/language-server in /src/static/app (#1017)
Bumps [@volar/language-server](https://github.com/volarjs/volar.js/tree/HEAD/packages/language-server) from 2.4.23 to 2.4.26.
- [Release notes](https://github.com/volarjs/volar.js/releases)
- [Changelog](https://github.com/volarjs/volar.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/volarjs/volar.js/commits/v2.4.26/packages/language-server)

---
updated-dependencies:
- dependency-name: "@volar/language-server"
  dependency-version: 2.4.26
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-09 09:55:47 +01:00
dependabot[bot]
880c94b8a3 build(deps): bump npm from 11.6.2 to 11.6.4 in /src/static/app (#1018)
Bumps [npm](https://github.com/npm/cli) from 11.6.2 to 11.6.4.
- [Release notes](https://github.com/npm/cli/releases)
- [Changelog](https://github.com/npm/cli/blob/latest/CHANGELOG.md)
- [Commits](https://github.com/npm/cli/compare/v11.6.2...v11.6.4)

---
updated-dependencies:
- dependency-name: npm
  dependency-version: 11.6.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-09 09:55:35 +01:00
dependabot[bot]
656eba3a57 build(deps): bump @vuepic/vue-datepicker in /src/static/app (#1020)
Bumps [@vuepic/vue-datepicker](https://github.com/Vuepic/vue-datepicker) from 12.0.1 to 12.1.0.
- [Release notes](https://github.com/Vuepic/vue-datepicker/releases)
- [Changelog](https://github.com/Vuepic/vue-datepicker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Vuepic/vue-datepicker/compare/v12.0.1...v12.1.0)

---
updated-dependencies:
- dependency-name: "@vuepic/vue-datepicker"
  dependency-version: 12.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-09 09:55:17 +01:00
dependabot[bot]
4154a27f4d build(deps): bump pydantic from 2.12.4 to 2.12.5 in /src (#1014)
Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.12.4 to 2.12.5.
- [Release notes](https://github.com/pydantic/pydantic/releases)
- [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md)
- [Commits](https://github.com/pydantic/pydantic/compare/v2.12.4...v2.12.5)

---
updated-dependencies:
- dependency-name: pydantic
  dependency-version: 2.12.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-09 09:54:41 +01:00
dependabot[bot]
785d0d6b06 build(deps): bump psycopg[binary] from 3.2.13 to 3.3.2 in /src (#1016)
Bumps [psycopg[binary]](https://github.com/psycopg/psycopg) from 3.2.13 to 3.3.2.
- [Changelog](https://github.com/psycopg/psycopg/blob/master/docs/news.rst)
- [Commits](https://github.com/psycopg/psycopg/compare/3.2.13...3.3.2)

---
updated-dependencies:
- dependency-name: psycopg[binary]
  dependency-version: 3.3.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-09 09:54:21 +01:00
DaanSelen
9af2983a7b chore: absolute paths and robuust checking
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Docker Build and Push / docker_build (push) Has been cancelled
Docker Build and Push / docker_scan (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2025-12-08 14:51:28 +01:00
10 changed files with 520 additions and 818 deletions

View File

@@ -39,11 +39,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v6
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -54,7 +54,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
uses: github/codeql-action/autobuild@v4
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -68,4 +68,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4

106
.github/workflows/docker-debug.yml vendored Normal file
View File

@@ -0,0 +1,106 @@
name: MANUAL Docker workflow for debugging
on:
workflow_dispatch:
env:
DOCKERHUB_PREFIX: docker.io
GITHUB_CONTAINER_PREFIX: ghcr.io
DOCKER_IMAGE: WGDashboard
jobs:
docker_build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ env.DOCKERHUB_PREFIX }}
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_CONTAINER_PREFIX }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: linux/amd64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract Docker metadata from environment
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.DOCKERHUB_PREFIX }}/donaldzou/${{ env.DOCKER_IMAGE }}
${{ env.GITHUB_CONTAINER_PREFIX }}/${{ github.repository_owner }}/${{ env.DOCKER_IMAGE }}
tags: |
type=ref,event=branch
type=ref,event=tag
type=sha,format=short,prefix=
- name: Build and export Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
docker_scan:
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
needs: docker_build
steps:
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ env.DOCKERHUB_PREFIX }}
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_CONTAINER_PREFIX }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Scout CVEs
uses: docker/scout-action@v1
with:
command: cves
image: ${{ env.GITHUB_CONTAINER_PREFIX }}/${{ github.repository_owner }}/${{ env.DOCKER_IMAGE }}:main
only-severities: critical,high
only-fixed: true
write-comment: true
github-token: ${{ secrets.GITHUB_TOKEN }}
exit-code: true
- name: Docker Scout Compare
uses: docker/scout-action@v1
with:
command: compare
# Set to Github for maximum compat
image: ${{ env.GITHUB_CONTAINER_PREFIX }}/${{ github.repository_owner }}/${{ env.DOCKER_IMAGE }}:main
to: ${{ env.GITHUB_CONTAINER_PREFIX }}/${{ github.repository_owner }}/${{ env.DOCKER_IMAGE }}:latest
only-severities: critical,high
ignore-unchanged: true
github-token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -76,7 +76,7 @@ RUN apk add --no-cache \
# Copy the requirements file into the build layer.
COPY ./src/requirements.txt /opt/wgdashboard/src
RUN if [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
sed -i "s|psycopg\[binary\]==3.2.13|psycopg\[c\]==3.2.13|" /opt/wgdashboard/src/requirements.txt; \
sed -i 's|psycopg\[binary\]|psycopg[c]|' /opt/wgdashboard/src/requirements.txt; \
fi; \
cat /opt/wgdashboard/src/requirements.txt

View File

@@ -6,7 +6,7 @@ trap 'stop_service' SIGTERM
# Hash password with bcrypt
hash_password() {
python3 -c "import bcrypt; print(bcrypt.hashpw('$1'.encode(), bcrypt.gensalt(12)).decode())"
${WGDASH}/src/venv/bin/python3 -c "import bcrypt; print(bcrypt.hashpw('$1'.encode(), bcrypt.gensalt(12)).decode())"
}
# Function to set or update section/key/value in the INI file
@@ -22,7 +22,7 @@ set_ini() {
if grep -q "^[[:space:]]*${key}[[:space:]]*=" "$config_file"; then
current_value=$(grep "^[[:space:]]*${key}[[:space:]]*=" "$config_file" | cut -d= -f2- | xargs)
# Don't display actual value if it's a password field
# Dont display actual value if it's a password field
if [[ "$key" == *"password"* ]]; then
if [ "$current_value" = "$value" ]; then
echo "- $key is already set correctly (value hidden)"
@@ -189,25 +189,55 @@ start_and_monitor() {
# Actually starting WGDashboard
echo "Starting WGDashboard directly with Gunicorn..."
/opt/wgdashboard/src/venv/bin/python3 ./venv/bin/gunicorn --config ./gunicorn.conf.py
[[ ! -d ${WGDASH}/src/log ]] && mkdir ${WGDASH}/src/log
${WGDASH}/src/venv/bin/gunicorn --config ${WGDASH}/src/gunicorn.conf.py
if [ $? -ne 0 ]; then
echo "Loading WGDashboard failed... Look above for details."
fi
# Wait a second before continuing, to give the python program some time to get ready.
sleep 1
echo -e "\nEnsuring container continuation."
# Find and monitor log file
local logdir="${WGDASH}/src/log"
latestErrLog=$(find "$logdir" -name "error_*.log" -type f -print | sort -r | head -n 1)
max_rounds="10"
round="0"
# Only tail the logs if they are found
if [ -n "$latestErrLog" ]; then
tail -f "$latestErrLog" &
# Wait for the tail process to end.
wait $!
else
echo "No log files found to tail. Something went wrong, exiting..."
# Hang in there for 10s for Gunicorn to get ready
while true; do
round=$((round + 1))
latest_error=$(ls -t ${WGDASH}/src/log/error_*.log 2> /dev/null | head -n 1)
if [[ $round -eq $max_rounds ]]; then
echo "Reached breaking point!"
break
fi
if [[ -z $latest_error ]]; then
echo -e "Logs not yet present! Retrying in 1 second!"
sleep 1s
else
break
fi
done
if [[ -z $latest_error ]]; then
echo -e "No error logs founds... Please investigate.\nExiting in 3 minutes..."
sleep 180s
exit 1
else
tail -f "$latest_error" &
wait $!
fi
echo "The blocking command has been broken! Script will exit in 3 minutes... Investigate!"
sleep 180s
exit 1
}
# Main execution flow

View File

@@ -16,7 +16,7 @@ from .DashboardAPIKey import DashboardAPIKey
class DashboardConfig:
DashboardVersion = 'v4.3.0.2'
DashboardVersion = 'v4.3.0.4'
ConfigurationPath = os.getenv('CONFIGURATION_PATH', '.')
ConfigurationFilePath = os.path.join(ConfigurationPath, 'wg-dashboard.ini')

View File

@@ -90,6 +90,7 @@ class PeerJobLogger:
db.and_(
(self.jobLogTable.c.LogID == LogID if LogID is not None else True),
(self.jobLogTable.c.JobID == JobID if JobID is not None else True),
db.or_(self.jobLogTable.c.Status == 0, self.jobLogTable.c.Status == 'false')
)
)
)

View File

@@ -10,8 +10,8 @@ requests==2.32.5
tcconfig==0.30.1
sqlalchemy==2.0.44
sqlalchemy_utils==0.42.0
psycopg[binary]==3.2.13
psycopg[binary]==3.3.2
PyMySQL==1.1.2
tzlocal==5.3.1
python-jose==3.5.0
pydantic==2.12.4
pydantic==2.12.5

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "app",
"version": "4.3.0.2",
"version": "4.3.0.4",
"private": true,
"type": "module",
"module": "es2022",
@@ -12,11 +12,11 @@
"preview": "vite preview"
},
"dependencies": {
"@volar/language-server": "2.4.23",
"@vue/language-server": "3.1.3",
"@vuepic/vue-datepicker": "^12.0.1",
"@volar/language-server": "2.4.26",
"@vue/language-server": "3.1.8",
"@vuepic/vue-datepicker": "^12.1.0",
"@vueuse/core": "^14.0.0",
"@vueuse/shared": "^14.0.0",
"@vueuse/shared": "^14.1.0",
"animate.css": "^4.1.1",
"bootstrap": "^5.3.2",
"bootstrap-icons": "^1.11.3",
@@ -27,7 +27,7 @@
"fuse.js": "^7.0.0",
"i": "^0.3.7",
"is-cidr": "^6.0.1",
"npm": "^11.6.2",
"npm": "^11.6.4",
"ol": "^10.7.0",
"pinia": "^3.0.3",
"pinia-plugin-persistedstate": "^4.7.1",