7 Commits
Author SHA1 Message Date
alu cbed40d904 fix makefile phony targets 2026-08-03 18:24:18 +00:00
alu 075ea07766 add ingore paths for web component linters 2026-07-31 23:59:07 +00:00
alu 91be26e320 update gitignore, format eslint config 2026-07-31 23:30:32 +00:00
alu ff63d8dc15 prevent error dialog from clearing on closing
tronnet/workflows: Code Style -- Web Components / style-web (push) Failing after 19s
2026-07-31 23:21:09 +00:00
alu ffa58e4218 use replace for web instead of static import
tronnet/workflows: Static Analysis -- Golang / static-go (push) Successful in 25s
2026-07-30 19:04:25 +00:00
alu 613f01456f use central repo for common workflows
tronnet/workflows: Static Analysis -- Golang / lint-check (push) Successful in 13s
tronnet/workflows: Code Style -- Web Components / lint-check (push) Failing after 15s
2026-07-29 23:40:43 +00:00
alu e8fd120ead add static analysis action
Static Analysis -- Golang / lint-check (push) Successful in 18s
Code Style -- Web Components / lint-check (push) Successful in 13s
2026-07-29 22:42:33 +00:00
12 changed files with 50 additions and 122 deletions
-33
View File
@@ -1,33 +0,0 @@
name: Static Analysis -- Golang
run-name: 'Static Analysis -- Golang -- ${{ gitea.repository }} ${{ gitea.ref_name }} ${{ gitea.sha }}'
on:
push:
branches:
- '*'
jobs:
lint-check:
runs-on: ubuntu-latest
steps:
- name: Check Out Repository
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Initialize Runner
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
- name: Initialize Go
run: make build-web && go get .
- name: Run Go Vet
id: static_govet
if: always()
run: go vet ./...
- name: Verify Static Analysis
if: >
steps.static_govet.outcome != 'success'
run: exit 1
-56
View File
@@ -1,56 +0,0 @@
name: Code Style - Web Components
run-name: 'Code Style -- Web Components -- ${{ gitea.repository }} ${{ gitea.ref_name }} ${{ gitea.sha }}'
on:
push:
branches:
- '*'
jobs:
lint-check:
runs-on: ubuntu-latest
steps:
- name: Check Out Repository
uses: actions/checkout@v4
- name: Initialize Runner
uses: actions/setup-node@v4
- name: Install Linters
run: |
npm install --no-save \
@eslint/eslintrc \
@eslint/js \
eslint \
globals \
html-validate \
stylelint \
stylelint-config-standard
- name: Verify Linters
run: |
npx html-validate --version
npx stylelint --version
npx eslint --version
- name: Run HTMLValidate
id: html_lint
run: npx html-validate --config dev_config/.htmlvalidate.json 'web/html/**/*'
- name: Run Stylelint
id: style_lint
if: always()
run: npx stylelint --config dev_config/.stylelintrc.json --formatter verbose --fix 'web/css/**/*.css'
- name: Run ESLint
id: js_lint
if: always()
env:
DEBUG: eslint:cli-engine
run: npx eslint --config dev_config/eslint.config.mjs --fix web/scripts/
- name: Verify Linters
if: >
steps.html_lint.outcome != 'success' ||
steps.style_lint.outcome != 'success' ||
steps.js_lint.outcome != 'success'
run: exit 1
-2
View File
@@ -1,5 +1,3 @@
**/config.json
**/package-lock.json
**/node_modules
dist/*
go.sum
+7 -4
View File
@@ -1,13 +1,10 @@
.PHONY: build test clean wfa-js
.PHONY: build build-web build-wfa-js clean clean-wfa-js ensure-dist workflow-init
build: clean ensure-dist build-web build-wfa-js
@echo "======================== Building Binary ======================="
# resolve symbolic links in web by copying it into dist/web/
CGO_ENABLED=0 go build -tags release -ldflags="-s -w" -v -o dist/ .
ensure-dist:
mkdir -p dist
build-web: ensure-dist
cp -rL web/ dist/web/
@@ -22,3 +19,9 @@ clean: clean-wfa-js
clean-wfa-js:
$(MAKE) clean -C WFA-JS
ensure-dist:
mkdir -p dist
workflow-init: ensure-dist build-web
cp -r dev_config/. .
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"log"
"proxmoxaas-dashboard/app/common"
"proxmoxaas-dashboard/app/routes"
"proxmoxaas-dashboard/dist/web" // go will complain here until the first build
"web" // go will complain here until the first build
"github.com/gin-gonic/gin"
"github.com/tdewolff/minify/v2"
+3
View File
@@ -0,0 +1,3 @@
web/modules/*
WFA-JS/*
dist/*
+3
View File
@@ -0,0 +1,3 @@
web/modules/*
WFA-JS/*
dist/*
+29 -25
View File
@@ -1,29 +1,33 @@
import { defineConfig } from "eslint/config";
import { defineConfig, globalIgnores } from "eslint/config";
import globals from "globals";
import js from "@eslint/js";
export default defineConfig([js.configs.recommended,{
languageOptions: {
globals: {
...globals.browser,
export default defineConfig([
js.configs.recommended,
globalIgnores(["dist/", "web/modules", "WFA-JS"]),
{
languageOptions: {
globals: {
...globals.browser,
},
ecmaVersion: "latest",
sourceType: "module",
},
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
"no-tabs": ["error", {
allowIndentationTabs: true,
}],
indent: ["error", "tab"],
"linebreak-style": ["error", "unix"],
quotes: ["error", "double"],
semi: ["error", "always"],
"brace-style": ["error", "stroustrup", { allowSingleLine: false }],
"no-unused-vars": ["warn", {
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}],
"prefer-const": ["error"]
},
}]);
rules: {
"no-tabs": ["error", {
allowIndentationTabs: true,
}],
indent: ["error", "tab"],
"linebreak-style": ["error", "unix"],
quotes: ["error", "double"],
semi: ["error", "always"],
"brace-style": ["error", "stroustrup", { allowSingleLine: false }],
"no-unused-vars": ["warn", {
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}],
"prefer-const": ["error"]
},
}
]);
+2
View File
@@ -8,9 +8,11 @@ require (
github.com/go-viper/mapstructure/v2 v2.5.0
github.com/tdewolff/minify/v2 v2.24.13
proxmoxaas-common-lib v0.0.0
web v0.0.0
)
replace proxmoxaas-common-lib => ./proxmoxaas-common-lib
replace web => ./dist/web
require (
github.com/bytedance/gopkg v0.1.4 // indirect
+3
View File
@@ -0,0 +1,3 @@
module web
go 1.26.0
+1 -1
View File
@@ -96,7 +96,7 @@ class ErrorDialog extends HTMLElement {
}
navigator.clipboard.writeText(errors);
}
this.parentElement.removeChild(this);
this.dialog.close();
});
}
+1
View File
@@ -6,6 +6,7 @@ window.addEventListener("DOMContentLoaded", init);
async function init () {
await deleteAllCookies();
setAppearance();
const formSubmitButton = document.querySelector("#submit");
formSubmitButton.addEventListener("click", async (e) => {
e.preventDefault();