mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(iframe): fixed issue with using full height of iframe, fixes #5605
This commit is contained in:
parent
c82d5f86ac
commit
e507bb6dd7
@ -107,9 +107,12 @@ function (angular, _, $) {
|
||||
this.dashboard.meta.fullscreen = this.state.fullscreen;
|
||||
|
||||
if (!this.state.fullscreen) {
|
||||
this.state.panelId = null;
|
||||
this.state.fullscreen = 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());
|
||||
@ -193,11 +196,13 @@ function (angular, _, $) {
|
||||
var self = this;
|
||||
self.panelScopes.push(panelScope);
|
||||
|
||||
if (self.state.panelId === panelScope.ctrl.panel.id) {
|
||||
if (self.state.edit) {
|
||||
panelScope.ctrl.editPanel();
|
||||
} else {
|
||||
panelScope.ctrl.viewPanel();
|
||||
if (!self.dashboard.meta.soloMode) {
|
||||
if (self.state.panelId === panelScope.ctrl.panel.id) {
|
||||
if (self.state.edit) {
|
||||
panelScope.ctrl.editPanel();
|
||||
} else {
|
||||
panelScope.ctrl.viewPanel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,15 +17,12 @@ function (angular, $) {
|
||||
var params = $location.search();
|
||||
panelId = parseInt(params.panelId);
|
||||
|
||||
// add fullscreen param;
|
||||
params.fullscreen = true;
|
||||
$location.search(params);
|
||||
$scope.onAppEvent("dashboard-initialized", $scope.initPanelScope);
|
||||
|
||||
dashboardLoaderSrv.loadDashboard($routeParams.type, $routeParams.slug).then(function(result) {
|
||||
result.meta.soloMode = true;
|
||||
$scope.initDashboard(result, $scope);
|
||||
});
|
||||
|
||||
$scope.onAppEvent("dashboard-initialized", $scope.initPanelScope);
|
||||
};
|
||||
|
||||
$scope.initPanelScope = function() {
|
||||
|
Loading…
Reference in New Issue
Block a user