Compare commits
2 Commits
3f723394c4
...
d95a82f248
| Author | SHA1 | Date | |
|---|---|---|---|
| d95a82f248 | |||
| fc42de2c49 |
@@ -1,7 +1,6 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"flag"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"proxmoxaas-dashboard/dist/web" // go will complain here until the first build
|
"proxmoxaas-dashboard/dist/web" // go will complain here until the first build
|
||||||
@@ -13,13 +12,10 @@ import (
|
|||||||
"github.com/tdewolff/minify/v2"
|
"github.com/tdewolff/minify/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Run() {
|
func Run(configPath *string) {
|
||||||
gin.SetMode(gin.ReleaseMode)
|
|
||||||
|
|
||||||
configPath := flag.String("config", "config.json", "path to config.json file")
|
|
||||||
flag.Parse()
|
|
||||||
common.Global = common.GetConfig(*configPath)
|
common.Global = common.GetConfig(*configPath)
|
||||||
|
|
||||||
|
gin.SetMode(gin.ReleaseMode)
|
||||||
router := gin.Default()
|
router := gin.Default()
|
||||||
m := common.InitMinify()
|
m := common.InitMinify()
|
||||||
ServeStatic(router, m)
|
ServeStatic(router, m)
|
||||||
|
|||||||
@@ -51,3 +51,41 @@ var MimeTypes = map[string]MimeType{
|
|||||||
Minifier: nil,
|
Minifier: nil,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// debug mime types
|
||||||
|
/*
|
||||||
|
var MimeTypes = map[string]MimeType{
|
||||||
|
"css": {
|
||||||
|
Type: "text/css",
|
||||||
|
Minifier: nil,
|
||||||
|
},
|
||||||
|
"html": {
|
||||||
|
Type: "text/html",
|
||||||
|
Minifier: nil,
|
||||||
|
},
|
||||||
|
"tmpl": {
|
||||||
|
Type: "text/plain",
|
||||||
|
Minifier: nil,
|
||||||
|
},
|
||||||
|
"frag": {
|
||||||
|
Type: "text/plain",
|
||||||
|
Minifier: nil,
|
||||||
|
},
|
||||||
|
"svg": {
|
||||||
|
Type: "image/svg+xml",
|
||||||
|
Minifier: nil,
|
||||||
|
},
|
||||||
|
"js": {
|
||||||
|
Type: "application/javascript",
|
||||||
|
Minifier: nil,
|
||||||
|
},
|
||||||
|
"wasm": {
|
||||||
|
Type: "application/wasm",
|
||||||
|
Minifier: nil,
|
||||||
|
},
|
||||||
|
"*": {
|
||||||
|
Type: "text/plain",
|
||||||
|
Minifier: nil,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"flag"
|
||||||
app "proxmoxaas-dashboard/app"
|
app "proxmoxaas-dashboard/app"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
app.Run()
|
configPath := flag.String("config", "config.json", "path to config.json file")
|
||||||
|
flag.Parse()
|
||||||
|
app.Run(configPath)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -449,7 +449,7 @@ async function refreshBoot () {
|
|||||||
if (boot.status !== 200) {
|
if (boot.status !== 200) {
|
||||||
alert("Error fetching instance boot order.");
|
alert("Error fetching instance boot order.");
|
||||||
}
|
}
|
||||||
else {
|
else if (type === "qemu") {
|
||||||
boot = boot.data;
|
boot = boot.data;
|
||||||
const order = document.querySelector("#boot-order");
|
const order = document.querySelector("#boot-order");
|
||||||
order.setHTMLUnsafe(boot);
|
order.setHTMLUnsafe(boot);
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class DraggableContainer extends HTMLElement {
|
|||||||
|
|
||||||
get value () {
|
get value () {
|
||||||
const value = [];
|
const value = [];
|
||||||
this.content.childNodes.forEach((element) => {
|
this.content.querySelectorAll(".draggable-item").forEach((element) => {
|
||||||
if (element.dataset.value) {
|
if (element.dataset.value) {
|
||||||
value.push(element.dataset.value);
|
value.push(element.dataset.value);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user