Moved the polling of data from the webgui to its own dedicated poller.
This should simplify testing of webgui.
This commit is contained in:
@@ -44,7 +44,8 @@ func main() {
|
||||
flag.Parse()
|
||||
|
||||
source := datasource.NewJSONSource(*url)
|
||||
gui := webgui.NewWebGui(source, 10*time.Second, 100)
|
||||
poller := datasource.NewDataPoller(source, 10*time.Second)
|
||||
gui := webgui.NewWebGui(poller, 100)
|
||||
http.Handle("/", gui)
|
||||
http.Handle("/munin", http.HandlerFunc(gui.ServeMuninHTTP))
|
||||
http.Handle("/muninconfig", http.HandlerFunc(gui.ServeMuninConfigHTTP))
|
||||
|
||||
Reference in New Issue
Block a user