|
@@ -13,7 +13,6 @@ import {Subject} from 'vendor/npm/rxjs/Subject';
|
|
|
|
|
|
|
|
class MetricsPanelCtrl extends PanelCtrl {
|
|
class MetricsPanelCtrl extends PanelCtrl {
|
|
|
scope: any;
|
|
scope: any;
|
|
|
- needsRefresh: boolean;
|
|
|
|
|
loading: boolean;
|
|
loading: boolean;
|
|
|
datasource: any;
|
|
datasource: any;
|
|
|
datasourceName: any;
|
|
datasourceName: any;
|
|
@@ -43,7 +42,6 @@ class MetricsPanelCtrl extends PanelCtrl {
|
|
|
this.timeSrv = $injector.get('timeSrv');
|
|
this.timeSrv = $injector.get('timeSrv');
|
|
|
this.templateSrv = $injector.get('templateSrv');
|
|
this.templateSrv = $injector.get('templateSrv');
|
|
|
this.scope = $scope;
|
|
this.scope = $scope;
|
|
|
- this.needsRefresh = false;
|
|
|
|
|
|
|
|
|
|
if (!this.panel.targets) {
|
|
if (!this.panel.targets) {
|
|
|
this.panel.targets = [{}];
|
|
this.panel.targets = [{}];
|
|
@@ -54,10 +52,6 @@ class MetricsPanelCtrl extends PanelCtrl {
|
|
|
this.events.on('panel-teardown', this.onPanelTearDown.bind(this));
|
|
this.events.on('panel-teardown', this.onPanelTearDown.bind(this));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private isRenderGraph () {
|
|
|
|
|
- return window.location.href.indexOf("/dashboard-solo/") === 0;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
private onPanelTearDown() {
|
|
private onPanelTearDown() {
|
|
|
if (this.dataSubscription) {
|
|
if (this.dataSubscription) {
|
|
|
this.dataSubscription.unsubscribe();
|
|
this.dataSubscription.unsubscribe();
|
|
@@ -74,14 +68,6 @@ class MetricsPanelCtrl extends PanelCtrl {
|
|
|
// ignore fetching data if another panel is in fullscreen
|
|
// ignore fetching data if another panel is in fullscreen
|
|
|
if (this.otherPanelInFullscreenMode()) { return; }
|
|
if (this.otherPanelInFullscreenMode()) { return; }
|
|
|
|
|
|
|
|
- if (this.scope.ctrl.dashboard.loadOnScroll) {
|
|
|
|
|
- if (!this.scope.$$childHead || (!this.scope.$$childHead.isVisible() && !this.isRenderGraph())) {
|
|
|
|
|
- this.scope.$$childHead.needsRefresh = true;
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- this.scope.$$childHead.needsRefresh = false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
// if we have snapshot data use that
|
|
// if we have snapshot data use that
|
|
|
if (this.panel.snapshotData) {
|
|
if (this.panel.snapshotData) {
|
|
|
this.updateTimeRange();
|
|
this.updateTimeRange();
|