Commit 79a803ea by Torkel Ödegaard

feat(ds observable): minor progress on handling data source observable

parent 0f657980
......@@ -27,6 +27,7 @@ class MetricsPanelCtrl extends PanelCtrl {
skipDataOnInit: boolean;
datasources: any[];
dataSubscription: any;
dataHandler: any;
constructor($scope, $injector) {
super($scope, $injector);
......@@ -203,7 +204,10 @@ class MetricsPanelCtrl extends PanelCtrl {
handleObservable(observable) {
this.dataSubscription = observable.subscribe({
next: (data) => {
console.log('panel: observer got data');
if (data.range) {
this.range = data.range;
}
this.dataHandler(data);
},
error: (error) => {
console.log('panel: observer got error');
......
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