Basic UI working state. Still needs clean and Assetfs to keep all dependencies in the application

This commit is contained in:
Nicholas Thompson
2019-02-26 23:25:37 +02:00
committed by ncthompson
parent f189ff0442
commit 8267e71f18
11 changed files with 773 additions and 58 deletions

View File

@@ -32,14 +32,15 @@ package main
import (
"flag"
"github.com/hpdvanwyk/invertergui/mk2if"
"github.com/hpdvanwyk/invertergui/webgui"
"github.com/mikepb/go-serial"
"github.com/prometheus/client_golang/prometheus/promhttp"
"io"
"log"
"net"
"net/http"
"github.com/hpdvanwyk/invertergui/mk2if"
"github.com/hpdvanwyk/invertergui/webgui"
"github.com/mikepb/go-serial"
"github.com/prometheus/client_golang/prometheus/promhttp"
)
func main() {
@@ -81,6 +82,8 @@ func main() {
gui := webgui.NewWebGui(mk2)
http.Handle("/", gui)
http.Handle("/ws", http.HandlerFunc(gui.ServeHub))
http.Handle("/js/controller.js", http.HandlerFunc(gui.ServeJS))
http.Handle("/munin", http.HandlerFunc(gui.ServeMuninHTTP))
http.Handle("/muninconfig", http.HandlerFunc(gui.ServeMuninConfigHTTP))
http.Handle("/metrics", promhttp.Handler())