diff --git a/src/app/controllers/grafanaCtrl.js b/src/app/controllers/grafanaCtrl.js index 6774f2d3236..2754595896f 100644 --- a/src/app/controllers/grafanaCtrl.js +++ b/src/app/controllers/grafanaCtrl.js @@ -95,9 +95,12 @@ function (angular, config, _, $) { var timeTaken = $rootScope.performance.allPanelsInitialized - $rootScope.performance.dashboardLoadStart; console.log("Dashboard::Performance - All panels initialized in " + timeTaken + " ms"); + // measure digest performance var rootDigestStart = window.performance.now(); - $rootScope.$apply(); - console.log("Dashboard::Performance Root Digest " + (window.performance.now() - rootDigestStart)); + for (var i = 0; i < 30; i++) { + $rootScope.$apply(); + } + console.log("Dashboard::Performance Root Digest " + ((window.performance.now() - rootDigestStart) / 30)); }, 3000); diff --git a/src/app/directives/grafanaPanel.js b/src/app/directives/grafanaPanel.js index 570f086d2da..0229277b038 100644 --- a/src/app/directives/grafanaPanel.js +++ b/src/app/directives/grafanaPanel.js @@ -69,6 +69,14 @@ function (angular, $) { /* jshint indent:false */ $compile(elem.contents())(newScope); elem.removeClass("ng-cloak"); + + var panelCtrlElem = $(elem.children()[0]); + var panelCtrlScope = panelCtrlElem.data().$scope; + + panelCtrlScope.$watchGroup(['fullscreen', 'panel.height', 'row.height'], function() { + panelCtrlElem.css({ minHeight: panelCtrlScope.panel.height || panelCtrlScope.row.height }); + panelCtrlElem.toggleClass('panel-fullscreen', panelCtrlScope.fullscreen ? true : false); + }); } newScope.$on('$destroy',function() { diff --git a/src/app/panels/graph/module.html b/src/app/panels/graph/module.html index 8e27adf5c31..385ba8b79a0 100644 --- a/src/app/panels/graph/module.html +++ b/src/app/panels/graph/module.html @@ -1,6 +1,5 @@