Commit e0dee062 by Ryan McKinley Committed by GitHub

Live: publish all dashboard changes to a single channel (#29474)

parent 546f569e
......@@ -48,7 +48,11 @@ func (h *DashboardHandler) publish(event dashboardEvent) error {
if err != nil {
return err
}
return h.Publisher("grafana/dashboard/"+event.UID, msg)
err = h.Publisher("grafana/dashboard/uid/"+event.UID, msg)
if err != nil {
return err
}
return h.Publisher("grafana/dashboard/changes", msg)
}
// DashboardSaved will broadcast to all connected dashboards
......
......@@ -61,13 +61,11 @@ class DashboardWatcher {
this.channel = live.getChannel({
scope: LiveChannelScope.Grafana,
namespace: 'dashboard',
path: uid,
path: `uid/${uid}`,
});
this.channel.getStream().subscribe(this.observer);
this.uid = uid;
}
console.log('Watch', uid);
}
leave() {
......
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