|
@@ -1,6 +1,7 @@
|
|
|
import angular from 'angular';
|
|
import angular from 'angular';
|
|
|
import _ from 'lodash';
|
|
import _ from 'lodash';
|
|
|
import config from 'app/core/config';
|
|
import config from 'app/core/config';
|
|
|
|
|
+import appEvents from 'app/core/app_events';
|
|
|
import { DashboardModel } from './dashboard_model';
|
|
import { DashboardModel } from './dashboard_model';
|
|
|
|
|
|
|
|
// represents the transient view state
|
|
// represents the transient view state
|
|
@@ -132,7 +133,7 @@ export class DashboardViewState {
|
|
|
if (this.fullscreenPanel === panel && this.editStateChanged === false) {
|
|
if (this.fullscreenPanel === panel && this.editStateChanged === false) {
|
|
|
return;
|
|
return;
|
|
|
} else {
|
|
} else {
|
|
|
- this.leaveFullscreen(false);
|
|
|
|
|
|
|
+ this.leaveFullscreen();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -140,30 +141,26 @@ export class DashboardViewState {
|
|
|
this.enterFullscreen(panel);
|
|
this.enterFullscreen(panel);
|
|
|
}
|
|
}
|
|
|
} else if (this.fullscreenPanel) {
|
|
} else if (this.fullscreenPanel) {
|
|
|
- this.leaveFullscreen(true);
|
|
|
|
|
|
|
+ this.leaveFullscreen();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- leaveFullscreen(render) {
|
|
|
|
|
- var panel = this.fullscreenPanel;
|
|
|
|
|
|
|
+ leaveFullscreen() {
|
|
|
|
|
+ const panel = this.fullscreenPanel;
|
|
|
|
|
|
|
|
this.dashboard.setViewMode(panel, false, false);
|
|
this.dashboard.setViewMode(panel, false, false);
|
|
|
- this.$scope.appEvent('dash-scroll', { restore: true });
|
|
|
|
|
|
|
|
|
|
- if (!render) {
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ delete this.fullscreenPanel;
|
|
|
|
|
|
|
|
this.$timeout(() => {
|
|
this.$timeout(() => {
|
|
|
|
|
+ appEvents.emit('dash-scroll', { restore: true });
|
|
|
|
|
+
|
|
|
if (this.oldTimeRange !== this.dashboard.time) {
|
|
if (this.oldTimeRange !== this.dashboard.time) {
|
|
|
- this.$rootScope.$broadcast('refresh');
|
|
|
|
|
|
|
+ this.dashboard.startRefresh();
|
|
|
} else {
|
|
} else {
|
|
|
- this.$rootScope.$broadcast('render');
|
|
|
|
|
|
|
+ this.dashboard.render();
|
|
|
}
|
|
}
|
|
|
- delete this.fullscreenPanel;
|
|
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
- return true;
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
enterFullscreen(panel) {
|
|
enterFullscreen(panel) {
|