Commit e507bb6d by Torkel Ödegaard

fix(iframe): fixed issue with using full height of iframe, fixes #5605

parent c82d5f86
...@@ -107,9 +107,12 @@ function (angular, _, $) { ...@@ -107,9 +107,12 @@ function (angular, _, $) {
this.dashboard.meta.fullscreen = this.state.fullscreen; this.dashboard.meta.fullscreen = this.state.fullscreen;
if (!this.state.fullscreen) { if (!this.state.fullscreen) {
this.state.panelId = null;
this.state.fullscreen = null; this.state.fullscreen = null;
this.state.edit = null; this.state.edit = null;
// clear panel id unless in solo mode
if (!this.dashboard.meta.soloMode) {
this.state.panelId = null;
}
} }
$location.search(this.serializeToUrl()); $location.search(this.serializeToUrl());
...@@ -193,11 +196,13 @@ function (angular, _, $) { ...@@ -193,11 +196,13 @@ function (angular, _, $) {
var self = this; var self = this;
self.panelScopes.push(panelScope); self.panelScopes.push(panelScope);
if (self.state.panelId === panelScope.ctrl.panel.id) { if (!self.dashboard.meta.soloMode) {
if (self.state.edit) { if (self.state.panelId === panelScope.ctrl.panel.id) {
panelScope.ctrl.editPanel(); if (self.state.edit) {
} else { panelScope.ctrl.editPanel();
panelScope.ctrl.viewPanel(); } else {
panelScope.ctrl.viewPanel();
}
} }
} }
......
...@@ -17,15 +17,12 @@ function (angular, $) { ...@@ -17,15 +17,12 @@ function (angular, $) {
var params = $location.search(); var params = $location.search();
panelId = parseInt(params.panelId); panelId = parseInt(params.panelId);
// add fullscreen param; $scope.onAppEvent("dashboard-initialized", $scope.initPanelScope);
params.fullscreen = true;
$location.search(params);
dashboardLoaderSrv.loadDashboard($routeParams.type, $routeParams.slug).then(function(result) { dashboardLoaderSrv.loadDashboard($routeParams.type, $routeParams.slug).then(function(result) {
result.meta.soloMode = true;
$scope.initDashboard(result, $scope); $scope.initDashboard(result, $scope);
}); });
$scope.onAppEvent("dashboard-initialized", $scope.initPanelScope);
}; };
$scope.initPanelScope = function() { $scope.initPanelScope = function() {
......
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