mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Live: publish all dashboard changes to a single channel (#29474)
This commit is contained in:
parent
546f569e0c
commit
e0dee06252
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user