diff --git a/src/app/controllers/dash.js b/src/app/controllers/dash.js index 90546486b2e..a4022f1ca7e 100644 --- a/src/app/controllers/dash.js +++ b/src/app/controllers/dash.js @@ -84,10 +84,6 @@ function (angular, $, config, _) { }; }; - $scope.row_style = function(row) { - return { 'min-height': row.collapse ? '5px' : row.height }; - }; - $scope.panel_path =function(type) { if(type) { return 'app/panels/'+type.replace(".","/"); diff --git a/src/app/controllers/grafanaCtrl.js b/src/app/controllers/grafanaCtrl.js index 2b9f7de5fe2..6774f2d3236 100644 --- a/src/app/controllers/grafanaCtrl.js +++ b/src/app/controllers/grafanaCtrl.js @@ -78,10 +78,8 @@ function (angular, config, _, $) { $scope.initProfiling = function() { var count = 0; - console.log("registering digest counter"); $scope.$watch(function digestCounter() { - console.log(1); count++; }, function() { }); @@ -96,6 +94,11 @@ function (angular, config, _, $) { var timeTaken = $rootScope.performance.allPanelsInitialized - $rootScope.performance.dashboardLoadStart; console.log("Dashboard::Performance - All panels initialized in " + timeTaken + " ms"); + + var rootDigestStart = window.performance.now(); + $rootScope.$apply(); + console.log("Dashboard::Performance Root Digest " + (window.performance.now() - rootDigestStart)); + }, 3000); }); diff --git a/src/app/controllers/row.js b/src/app/controllers/row.js index 587c7de42d7..cbf04f890d8 100644 --- a/src/app/controllers/row.js +++ b/src/app/controllers/row.js @@ -32,7 +32,7 @@ function (angular, app, _) { } }; - // This can be overridden by individual panels + // This can be overridden by individual panels $scope.close_edit = function() { $scope.$broadcast('render'); }; @@ -108,4 +108,12 @@ function (angular, app, _) { }); + module.directive('rowHeight', function() { + return function(scope, element) { + scope.$watchGroup(['row.collapse', 'row.height'], function() { + element[0].style.minHeight = scope.row.collapse ? '5px' : scope.row.height; + }); + }; + }); + }); diff --git a/src/app/partials/dashboard.html b/src/app/partials/dashboard.html index c512252e1b8..9fa279578ce 100644 --- a/src/app/partials/dashboard.html +++ b/src/app/partials/dashboard.html @@ -27,7 +27,7 @@
-
+