10 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
alu ce1576fbd6 remove global usage for wasm
ProxmoxAAS-Dashboard Code Style Check / lint-check (push) Successful in 16s
2026-07-29 16:13:55 +00:00
alu 0caf27eb7d fix missing autocomplete attributes
ProxmoxAAS-Dashboard Code Style Check / lint-check (push) Failing after 14s
2026-07-29 03:36:59 +00:00
alu 7f5c016e31 add lint workflow, remove node package
ProxmoxAAS-Dashboard Code Style Check / lint-check (push) Failing after 14s
2026-07-29 03:21:56 +00:00
16 changed files with 66 additions and 102 deletions
-59
View File
@@ -1,59 +0,0 @@
name: ProxmoxAAS-Dashboard Code Style Check
run-name: Code style check on ${{ 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: always()
run: |
if [ "${{ steps.html_lint.outcome }}" != "success" ] || \
[ "${{ steps.style_lint.outcome }}" != "success" ] || \
[ "${{ steps.js_lint.outcome }}" != "success" ]; then
echo "At least one linter failed."
exit 1
fi
-2
View File
@@ -1,5 +1,3 @@
**/config.json **/config.json
**/package-lock.json
**/node_modules
dist/* dist/*
go.sum go.sum
+12 -5
View File
@@ -1,13 +1,14 @@
.PHONY: build test clean wfa-js .PHONY: build build-web build-wfa-js clean clean-wfa-js ensure-dist workflow-init
build: clean build-wfa-js build: clean ensure-dist build-web build-wfa-js
@echo "======================== Building Binary =======================" @echo "======================== Building Binary ======================="
mkdir -p dist
# resolve symbolic links in web by copying it into dist/web/ # resolve symbolic links in web by copying it into dist/web/
cp -rL web/ 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/ .
build-wfa-js: build-web: ensure-dist
cp -rL web/ dist/web/
build-wfa-js: ensure-dist
$(MAKE) -C WFA-JS $(MAKE) -C WFA-JS
cp -f WFA-JS/dist/* web/modules cp -f WFA-JS/dist/* web/modules
@@ -18,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 -1
Submodule WFA-JS updated: f8f8636cc3...f53f344fb3
+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"
"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"
+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
+2 -2
View File
@@ -58,9 +58,9 @@
<div id="body"> <div id="body">
<form method="dialog" class="input-grid" style="grid-template-columns: auto 1fr;" id="form"> <form method="dialog" class="input-grid" style="grid-template-columns: auto 1fr;" id="form">
<label for="new-password">New Password</label> <label for="new-password">New Password</label>
<input class="w3-input w3-border" id="new-password" name="new-password" type="password" required> <input class="w3-input w3-border" id="new-password" name="new-password" type="password" autocomplete="new-password" required>
<label for="confirm-password">Confirm Password</label> <label for="confirm-password">Confirm Password</label>
<input class="w3-input w3-border" id="confirm-password" name="confirm-password" type="password" required> <input class="w3-input w3-border" id="confirm-password" name="confirm-password" type="password" autocomplete="new-password" required>
</form> </form>
</div> </div>
<div id="controls" class="w3-center w3-container"> <div id="controls" class="w3-center w3-container">
+2 -2
View File
@@ -114,9 +114,9 @@
<label class="container-specific none" for="rootfs-size">ROOTFS Size (GiB)</label> <label class="container-specific none" for="rootfs-size">ROOTFS Size (GiB)</label>
<input class="w3-input w3-border container-specific none" name="rootfs-size" id="rootfs-size" type="number" min="0" max="131072" required disabled> <input class="w3-input w3-border container-specific none" name="rootfs-size" id="rootfs-size" type="number" min="0" max="131072" required disabled>
<label class="container-specific none" for="password">Password</label> <label class="container-specific none" for="password">Password</label>
<input class="w3-input w3-border container-specific none" name="password" id="password" type="password" required disabled> <input class="w3-input w3-border container-specific none" name="password" id="password" type="password" autocomplete="new-password" required disabled>
<label class="container-specific none" for="confirm-password">Confirm Password</label> <label class="container-specific none" for="confirm-password">Confirm Password</label>
<input class="w3-input w3-border container-specific none" name="confirm-password" id="confirm-password" type="password" required disabled> <input class="w3-input w3-border container-specific none" name="confirm-password" id="confirm-password" type="password" autocomplete="new-password" required disabled>
</form> </form>
</div> </div>
<div id="controls" class="w3-center w3-container"> <div id="controls" class="w3-center w3-container">
+1 -1
View File
@@ -560,7 +560,7 @@ export default function init (path) {
const wasm = obj.instance; const wasm = obj.instance;
global.wfa = wasm global.wfa = wasm
go.run(wasm); go.run(wasm);
res() res(wasm)
} }
if ('instantiateStreaming' in WebAssembly) { if ('instantiateStreaming' in WebAssembly) {
WebAssembly.instantiateStreaming(fetch(path), go.importObject).then(function (obj) { WebAssembly.instantiateStreaming(fetch(path), go.importObject).then(function (obj) {
+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();
}); });
} }
+5 -3
View File
@@ -5,10 +5,12 @@ import wfaInit from "../modules/wfa.js";
window.addEventListener("DOMContentLoaded", init); window.addEventListener("DOMContentLoaded", init);
var wfa;
async function init () { async function init () {
setAppearance(); setAppearance();
wfaInit("modules/wfa.wasm"); wfa = await wfaInit("modules/wfa.wasm");
initInstances(); initInstances();
document.querySelector("#instance-add").addEventListener("click", handleInstanceAddButton); document.querySelector("#instance-add").addEventListener("click", handleInstanceAddButton);
@@ -272,8 +274,8 @@ function sortInstances () {
}; };
criteria = (item, query) => { criteria = (item, query) => {
// lower is better // lower is better
const { score, CIGAR } = global.wfa.wfAlign(query, item, penalties, true); const { score, CIGAR } = wfa.wfAlign(query, item, penalties, true);
const alignment = global.wfa.DecodeCIGAR(CIGAR); const alignment = wfa.DecodeCIGAR(CIGAR);
return { score: score / item.length, alignment }; return { score: score / item.length, alignment };
}; };
} }
+1
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();