mirror of
https://github.com/grafana/grafana.git
synced 2026-08-13 06:34:55 -05:00
feat(panel): added new panel event panel-initialized
This commit is contained in:
@@ -36,7 +36,7 @@ function (angular, _, $) {
|
|||||||
self.update(payload);
|
self.update(payload);
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.onAppEvent('panel-instantiated', function(evt, payload) {
|
$scope.onAppEvent('panel-initialized', function(evt, payload) {
|
||||||
self.registerPanel(payload.scope);
|
self.registerPanel(payload.scope);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -50,8 +50,11 @@ export class PanelCtrl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
this.publishAppEvent('panel-instantiated', {scope: this.$scope});
|
|
||||||
this.calculatePanelHeight();
|
this.calculatePanelHeight();
|
||||||
|
|
||||||
|
this.publishAppEvent('panel-initialized', {scope: this.$scope});
|
||||||
|
this.events.emit('panel-initialized');
|
||||||
|
|
||||||
this.refresh();
|
this.refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user