diff --git a/src/app/components/settings.js b/src/app/components/settings.js index 3edafc5a407..b43237224b4 100644 --- a/src/app/components/settings.js +++ b/src/app/components/settings.js @@ -19,7 +19,7 @@ function (_, crypto) { default_route : '/dashboard/file/default.json', playlist_timespan : "1m", unsaved_changes_warning : true, - search : { max_results: 20 }, + search : { max_results: 16 }, admin : {} }; diff --git a/src/app/controllers/dashboardCtrl.js b/src/app/controllers/dashboardCtrl.js index 5620b7305a2..7132ca8a571 100644 --- a/src/app/controllers/dashboardCtrl.js +++ b/src/app/controllers/dashboardCtrl.js @@ -13,7 +13,7 @@ function (angular, $, config, _) { module.controller('DashboardCtrl', function( $scope, $rootScope, dashboardKeybindings, filterSrv, dashboardSrv, dashboardViewStateSrv, - panelMoveSrv, timer) { + panelMoveSrv, timer, $timeout) { $scope.editor = { index: 0 }; $scope.panelNames = config.panels; @@ -21,6 +21,13 @@ function (angular, $, config, _) { $scope.init = function() { $scope.availablePanels = config.panels; $scope.onAppEvent('setup-dashboard', $scope.setupDashboard); + + angular.element(window).bind('resize', function() { + $timeout(function() { + $scope.$broadcast('render'); + }); + }); + }; $scope.setupDashboard = function(event, dashboardData) { diff --git a/src/app/directives/grafanaGraph.js b/src/app/directives/grafanaGraph.js index 38ef36bc912..222bde78b26 100755 --- a/src/app/directives/grafanaGraph.js +++ b/src/app/directives/grafanaGraph.js @@ -46,11 +46,6 @@ function (angular, $, kbn, moment, _) { render_panel(); }); - // Re-render if the window is resized - angular.element(window).bind('resize', function() { - render_panel(); - }); - function setElementHeight() { try { var height = scope.height || scope.panel.height || scope.row.height; diff --git a/src/app/partials/search.html b/src/app/partials/search.html index e1c9f158e0b..7e7ee2909db 100644 --- a/src/app/partials/search.html +++ b/src/app/partials/search.html @@ -64,11 +64,6 @@ bindonce ng-repeat="row in results.dashboards" ng-class="{'selected': $index === selectedIndex }" ng-click="goToDashboard(row.id)"> - - - - -
+ + + + + diff --git a/src/app/services/graphite/graphiteDatasource.js b/src/app/services/graphite/graphiteDatasource.js index e048484d28c..761b29b3a9f 100644 --- a/src/app/services/graphite/graphiteDatasource.js +++ b/src/app/services/graphite/graphiteDatasource.js @@ -150,7 +150,7 @@ function (angular, _, $, config, kbn, moment) { if (rounding === 'round-up') { if (date.get('s')) { - date.add('m', 1); + date.add(1, 'm'); } } else if (rounding === 'round-down') { @@ -159,7 +159,7 @@ function (angular, _, $, config, kbn, moment) { // to guarantee that we get all the data that // exists for the specified range if (date.get('s')) { - date.subtract('m', 1); + date.subtract(1, 'm'); } } diff --git a/src/css/less/grafana.less b/src/css/less/grafana.less index 709d7fdb028..fdc6051bc67 100644 --- a/src/css/less/grafana.less +++ b/src/css/less/grafana.less @@ -52,7 +52,7 @@ } .search-results-container { - max-height: 570px; + max-height: 600px; overflow: auto; display: block; .search-result-item a {