Commit a264c724 authored by Stefan Dähling's avatar Stefan Dähling
Browse files

webui fix

parent 0b65e036
Pipeline #419177 passed with stages
in 2 minutes and 27 seconds
......@@ -142,7 +142,10 @@ func (fe *Frontend) server(port int) (serv *http.Server) {
s.Path("/pf/modules").Methods("POST", "PUT", "POST").HandlerFunc(fe.methodNotAllowed)
s.PathPrefix("").HandlerFunc(fe.resourceNotFound)
s.Use(fe.loggingMiddleware)
r.HandleFunc("/", http.FileServer(http.Dir("./web")).ServeHTTP)
r.PathPrefix("/").Handler(http.StripPrefix("/", http.FileServer(http.Dir("./web"))))
// r.HandleFunc("/", http.FileServer(http.Dir("./web")).ServeHTTP)
// r.HandleFunc("/css/", http.FileServer(http.Dir("./web/css")).ServeHTTP)
// r.HandleFunc("/js/", http.FileServer(http.Dir("./web/js")).ServeHTTP)
serv = &http.Server{
Addr: ":" + strconv.Itoa(port),
Handler: r,
......
......@@ -60,9 +60,9 @@ function contentOverview(mass) {
$("#"+masID).append("<tr><th>"+masID+"</th></tr>");
$("#"+masID).append("<tr><th></th><th>Name:</th><th>"+i.config.name+"</th></tr>");
$("#"+masID).append("<tr><th></th><th>Agents per agency:</th><th>"+i.config.agentsperagency.toString()+"</th></tr>");
$("#"+masID).append("<tr><th></th><th>DF:</th><th>"+i.config.df.toString()+"</th></tr>");
$("#"+masID).append("<tr><th></th><th>Logging:</th><th>"+i.config.logging.toString()+"</th></tr>");
$("#"+masID).append("<tr><th></th><th>MQTT:</th><th>"+i.config.mqtt.toString()+"</th></tr>");
$("#"+masID).append("<tr><th></th><th>DF:</th><th>"+i.config.df.active.toString()+"</th></tr>");
$("#"+masID).append("<tr><th></th><th>Logging:</th><th>"+i.config.logger.active.toString()+"</th></tr>");
$("#"+masID).append("<tr><th></th><th>MQTT:</th><th>"+i.config.mqtt.active.toString()+"</th></tr>");
$("#"+masID).append("<tr><th></th><th>Agents:</th><th>"+i.numagents.toString()+"</th></tr>");
}
}
......@@ -118,13 +118,13 @@ function contentMasInfo(masInfo) {
$("#masinfoconfig").append("<tr><th>Config</th></tr>");
$("#masinfoconfig").append("<tr><th></th><th>Name:</th><th>"+masInfo.config.name+"</th></tr>");
$("#masinfoconfig").append("<tr><th></th><th>Agents per agency:</th><th>"+masInfo.config.agentsperagency.toString()+"</th></tr>");
$("#masinfoconfig").append("<tr><th></th><th>DF:</th><th>"+masInfo.config.df.toString()+"</th></tr>");
$("#masinfoconfig").append("<tr><th></th><th>Logging:</th><th>"+masInfo.config.logging.toString()+"</th></tr>");
$("#masinfoconfig").append("<tr><th></th><th>MQTT:</th><th>"+masInfo.config.mqtt.toString()+"</th></tr>");
$("#masinfoconfig").append("<tr><th></th><th>DF:</th><th>"+masInfo.config.df.active.toString()+"</th></tr>");
$("#masinfoconfig").append("<tr><th></th><th>Logging:</th><th>"+masInfo.config.logger.active.toString()+"</th></tr>");
$("#masinfoconfig").append("<tr><th></th><th>MQTT:</th><th>"+masInfo.config.mqtt.active.toString()+"</th></tr>");
$(".content").append("<hr>");
$(".content").append("<table id=\"masinfocontainer\"></table>");
$("#masinfocontainer").append("<tr><th>Containers</th></tr>");
for (let i of masInfo.groups.instances) {
for (let i of masInfo.imagegroups.instances) {
$("#masinfocontainer").append("<tr><th></th><th>"+i.id.toString()+":</th><th>"+i.config.image+"</th></tr>");
$("#masinfocontainer").append("<tr><th></th><th></th><th>Agencies:</th><th>"+i.agencies.counter.toString()+"</th></tr>");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment