1 Commits
Author SHA1 Message Date
alu 61314d7eea use central repo for common workflows
Code Quality / code-quality (push) Successful in 15s
2026-07-29 23:31:34 +00:00
11 changed files with 44 additions and 50 deletions
+11
View File
@@ -0,0 +1,11 @@
name: Code Quality
run-name: Code Quality
on:
push:
branches:
- '*'
jobs:
code-quality:
uses: tronnet/workflows/.gitea/workflows/code-quality.yaml@main
+2
View File
@@ -1,3 +1,5 @@
**/config.json **/config.json
**/package-lock.json
**/node_modules
dist/* dist/*
go.sum go.sum
+4 -7
View File
@@ -1,10 +1,13 @@
.PHONY: build build-web build-wfa-js clean clean-wfa-js ensure-dist workflow-init .PHONY: build test clean wfa-js
build: clean ensure-dist build-web build-wfa-js build: clean ensure-dist build-web build-wfa-js
@echo "======================== Building Binary =======================" @echo "======================== Building Binary ======================="
# resolve symbolic links in web by copying it into dist/web/ # resolve symbolic links in web by copying it into dist/web/
CGO_ENABLED=0 go build -tags release -ldflags="-s -w" -v -o dist/ . CGO_ENABLED=0 go build -tags release -ldflags="-s -w" -v -o dist/ .
ensure-dist:
mkdir -p dist
build-web: ensure-dist build-web: ensure-dist
cp -rL web/ dist/web/ cp -rL web/ dist/web/
@@ -19,9 +22,3 @@ clean: clean-wfa-js
clean-wfa-js: clean-wfa-js:
$(MAKE) clean -C 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" "log"
"proxmoxaas-dashboard/app/common" "proxmoxaas-dashboard/app/common"
"proxmoxaas-dashboard/app/routes" "proxmoxaas-dashboard/app/routes"
"web" // go will complain here until the first build "proxmoxaas-dashboard/dist/web" // go will complain here until the first build
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/tdewolff/minify/v2" "github.com/tdewolff/minify/v2"
-3
View File
@@ -1,3 +0,0 @@
web/modules/*
WFA-JS/*
dist/*
-3
View File
@@ -1,3 +0,0 @@
web/modules/*
WFA-JS/*
dist/*
+25 -29
View File
@@ -1,33 +1,29 @@
import { defineConfig, globalIgnores } from "eslint/config"; import { defineConfig } from "eslint/config";
import globals from "globals"; import globals from "globals";
import js from "@eslint/js"; import js from "@eslint/js";
export default defineConfig([ export default defineConfig([js.configs.recommended,{
js.configs.recommended, languageOptions: {
globalIgnores(["dist/", "web/modules", "WFA-JS"]), globals: {
{ ...globals.browser,
languageOptions: {
globals: {
...globals.browser,
},
ecmaVersion: "latest",
sourceType: "module",
}, },
rules: { ecmaVersion: "latest",
"no-tabs": ["error", { sourceType: "module",
allowIndentationTabs: true, },
}], rules: {
indent: ["error", "tab"], "no-tabs": ["error", {
"linebreak-style": ["error", "unix"], allowIndentationTabs: true,
quotes: ["error", "double"], }],
semi: ["error", "always"], indent: ["error", "tab"],
"brace-style": ["error", "stroustrup", { allowSingleLine: false }], "linebreak-style": ["error", "unix"],
"no-unused-vars": ["warn", { quotes: ["error", "double"],
"argsIgnorePattern": "^_", semi: ["error", "always"],
"varsIgnorePattern": "^_", "brace-style": ["error", "stroustrup", { allowSingleLine: false }],
"caughtErrorsIgnorePattern": "^_" "no-unused-vars": ["warn", {
}], "argsIgnorePattern": "^_",
"prefer-const": ["error"] "varsIgnorePattern": "^_",
}, "caughtErrorsIgnorePattern": "^_"
} }],
]); "prefer-const": ["error"]
},
}]);
-2
View File
@@ -8,11 +8,9 @@ require (
github.com/go-viper/mapstructure/v2 v2.5.0 github.com/go-viper/mapstructure/v2 v2.5.0
github.com/tdewolff/minify/v2 v2.24.13 github.com/tdewolff/minify/v2 v2.24.13
proxmoxaas-common-lib v0.0.0 proxmoxaas-common-lib v0.0.0
web v0.0.0
) )
replace proxmoxaas-common-lib => ./proxmoxaas-common-lib replace proxmoxaas-common-lib => ./proxmoxaas-common-lib
replace web => ./dist/web
require ( require (
github.com/bytedance/gopkg v0.1.4 // indirect github.com/bytedance/gopkg v0.1.4 // indirect
-3
View File
@@ -1,3 +0,0 @@
module web
go 1.26.0
+1 -1
View File
@@ -96,7 +96,7 @@ class ErrorDialog extends HTMLElement {
} }
navigator.clipboard.writeText(errors); navigator.clipboard.writeText(errors);
} }
this.dialog.close(); this.parentElement.removeChild(this);
}); });
} }
-1
View File
@@ -6,7 +6,6 @@ window.addEventListener("DOMContentLoaded", init);
async function init () { async function init () {
await deleteAllCookies(); await deleteAllCookies();
setAppearance(); setAppearance();
const formSubmitButton = document.querySelector("#submit"); const formSubmitButton = document.querySelector("#submit");
formSubmitButton.addEventListener("click", async (e) => { formSubmitButton.addEventListener("click", async (e) => {
e.preventDefault(); e.preventDefault();