5 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
10 changed files with 50 additions and 37 deletions
-2
View File
@@ -1,5 +1,3 @@
**/config.json **/config.json
**/package-lock.json
**/node_modules
dist/* dist/*
go.sum 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 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/
@@ -22,3 +19,9 @@ 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 -3
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"
"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/gin-gonic/gin"
"github.com/tdewolff/minify/v2" "github.com/tdewolff/minify/v2"
@@ -43,8 +43,6 @@ func Run() {
// run on all interfaces with port // run on all interfaces with port
log.Fatal("[ERR ] starting gin router: ", router.Run(fmt.Sprintf("0.0.0.0:%d", common.Global.Port))) log.Fatal("[ERR ] starting gin router: ", router.Run(fmt.Sprintf("0.0.0.0:%d", common.Global.Port)))
log.Println("here")
} }
// setup static resources under web (css, images, modules, scripts) // setup static resources under web (css, images, modules, scripts)
+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 globals from "globals";
import js from "@eslint/js"; import js from "@eslint/js";
export default defineConfig([js.configs.recommended,{ export default defineConfig([
languageOptions: { js.configs.recommended,
globals: { globalIgnores(["dist/", "web/modules", "WFA-JS"]),
...globals.browser, {
languageOptions: {
globals: {
...globals.browser,
},
ecmaVersion: "latest",
sourceType: "module",
}, },
ecmaVersion: "latest", rules: {
sourceType: "module", "no-tabs": ["error", {
}, allowIndentationTabs: true,
rules: { }],
"no-tabs": ["error", { indent: ["error", "tab"],
allowIndentationTabs: true, "linebreak-style": ["error", "unix"],
}], quotes: ["error", "double"],
indent: ["error", "tab"], semi: ["error", "always"],
"linebreak-style": ["error", "unix"], "brace-style": ["error", "stroustrup", { allowSingleLine: false }],
quotes: ["error", "double"], "no-unused-vars": ["warn", {
semi: ["error", "always"], "argsIgnorePattern": "^_",
"brace-style": ["error", "stroustrup", { allowSingleLine: false }], "varsIgnorePattern": "^_",
"no-unused-vars": ["warn", { "caughtErrorsIgnorePattern": "^_"
"argsIgnorePattern": "^_", }],
"varsIgnorePattern": "^_", "prefer-const": ["error"]
"caughtErrorsIgnorePattern": "^_" },
}], }
"prefer-const": ["error"] ]);
},
}]);
+2
View File
@@ -8,9 +8,11 @@ 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
@@ -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); navigator.clipboard.writeText(errors);
} }
this.parentElement.removeChild(this); this.dialog.close();
}); });
} }
+1 -2
View File
@@ -6,6 +6,7 @@ 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();
@@ -31,8 +32,6 @@ async function init () {
formSubmitButton.innerText = "LOGIN"; formSubmitButton.innerText = "LOGIN";
} }
}); });
let d = 0
} }
async function requestTicket (username, password, realm) { async function requestTicket (username, password, realm) {