-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add live reload functionality #386
Conversation
3211c19
to
7e1fa68
Compare
d665499
to
e60ec58
Compare
The PR description is out of date, right? We do use the |
Correct - I just updated the description. Thx |
Basic auth fix here: #432 |
+ add some logging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great! Just the one comment about auth validation
@@ -144,63 +146,43 @@ func (p *Server) Start() error { | |||
r.Post(pattern, p.blockHandler(response)) | |||
} | |||
r.Get("/", p.RootHandler) | |||
r.Get("/api/live/ws", livereload.LiveReloadHandlerFunc(upgrader)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Websocket only works with authentication. I added the basic auth support here: #432 but we should probably validate that auth is there (or figure out how to make it work without)
Currently, Grizzly Server does not notice when a file is edited. This PR attempts to add a
livereload feature. When a file is changed on disk (similar to
grr watch
which it willlikely replace), the dashboard will be reloaded.
Grafana itself has "live" functionality. This PR wires itself into that. Support is currently for dashboards only.