mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Fixes alert panel header icon not showing (#30840)
* Alerting: Fixes alert panel header icon not showing * Remove as any
This commit is contained in:
@@ -77,7 +77,12 @@ module.directive('grafanaPanel', ($rootScope, $document, $timeout) => {
|
||||
);
|
||||
|
||||
subs.add(
|
||||
panel.events.subscribe(RenderEvent, () => {
|
||||
panel.events.subscribe(RenderEvent, (event) => {
|
||||
// this event originated from angular so no need to bubble it back
|
||||
if (event.payload?.fromAngular) {
|
||||
return;
|
||||
}
|
||||
|
||||
updateDimensionsFromParentScope();
|
||||
|
||||
$timeout(() => {
|
||||
@@ -87,6 +92,16 @@ module.directive('grafanaPanel', ($rootScope, $document, $timeout) => {
|
||||
})
|
||||
);
|
||||
|
||||
subs.add(
|
||||
ctrl.events.subscribe(RenderEvent, (event) => {
|
||||
// this event originated from angular so bubble it to react so the PanelChromeAngular can update the panel header alert state
|
||||
if (event.payload) {
|
||||
event.payload.fromAngular = true;
|
||||
panel.events.publish(event);
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
scope.$on('$destroy', () => {
|
||||
elem.off();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user