|
@@ -44,6 +44,7 @@ export class PanelQueryRunner {
|
|
|
private subject?: ReplaySubject<PanelData>;
|
|
private subject?: ReplaySubject<PanelData>;
|
|
|
private subscription?: Unsubscribable;
|
|
private subscription?: Unsubscribable;
|
|
|
private transformations?: DataTransformerConfig[];
|
|
private transformations?: DataTransformerConfig[];
|
|
|
|
|
+ private lastResult?: PanelData;
|
|
|
|
|
|
|
|
constructor() {
|
|
constructor() {
|
|
|
this.subject = new ReplaySubject(1);
|
|
this.subject = new ReplaySubject(1);
|
|
@@ -153,12 +154,10 @@ export class PanelQueryRunner {
|
|
|
this.subscription.unsubscribe();
|
|
this.subscription.unsubscribe();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // Makes sure everything is a proper DataFrame
|
|
|
|
|
- const prepare = preProcessPanelData();
|
|
|
|
|
-
|
|
|
|
|
this.subscription = observable.subscribe({
|
|
this.subscription = observable.subscribe({
|
|
|
next: (data: PanelData) => {
|
|
next: (data: PanelData) => {
|
|
|
- this.subject.next(prepare(data));
|
|
|
|
|
|
|
+ this.lastResult = preProcessPanelData(data, this.lastResult);
|
|
|
|
|
+ this.subject.next(this.lastResult);
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|