diff --git a/Makefile b/Makefile index eeb77f5..76aa374 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,9 @@ DUSER=aceberg DNAME=watchyourlan +IFACE=virbr-bw +DBPATH=data/hosts.db + mod: cd src && \ rm go.mod && \ @@ -9,7 +12,9 @@ mod: run: cd src && \ - sudo go run . + sudo \ + env IFACE=$(IFACE) DBPATH=$(DBPATH) \ + go run . go-build: cd src && \ @@ -21,7 +26,7 @@ docker-build: docker-run: docker rm wyl || true docker run --name wyl \ - -e "IFACE=virbr-bw" \ + -e "IFACE=$(IFACE)" \ -e "TZ=Asia/Novosibirsk" \ --network="host" \ -v ~/.dockerdata/wyl:/data \ diff --git a/src/index.go b/src/index.go index ab57417..fe7c71d 100644 --- a/src/index.go +++ b/src/index.go @@ -44,7 +44,9 @@ func webgui() { // fmt.Println(FoundHosts) address := AppConfig.GuiIP + ":" + AppConfig.GuiPort - fmt.Println(fmt.Sprintf("http://%s", address)) + fmt.Println("\n=================================== ") + fmt.Println(fmt.Sprintf("Web GUI at http://%s", address)) + fmt.Println("=================================== \n") http.HandleFunc("/", index) http.HandleFunc("/update_host/", update_host) diff --git a/src/templates/index.html b/src/templates/index.html index ecdce53..38b4dbd 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -40,7 +40,6 @@ Hardware Last seen Known - {{ range . }}
@@ -55,14 +54,11 @@ {{ .Date }} {{ if eq .Known 1 }} - + {{ else }} - + {{ end }} - - -
{{ end }}