mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Small fixes for firefox
This commit is contained in:
parent
019d077f5a
commit
17ffb167e2
@ -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 : {}
|
||||
};
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -64,11 +64,6 @@
|
||||
bindonce ng-repeat="row in results.dashboards"
|
||||
ng-class="{'selected': $index === selectedIndex }" ng-click="goToDashboard(row.id)">
|
||||
|
||||
<a class="search-result-link" href="#/dashboard/db/{{row.id}}">
|
||||
<i class="icon icon-th-large"></i>
|
||||
<span bo-text="row.id"></span>
|
||||
</a>
|
||||
|
||||
<div class="search-result-actions">
|
||||
<a ng-click="shareDashboard(row.id, row.id, $event)" config-modal="app/partials/dashLoaderShare.html">
|
||||
<i class="icon-share"></i> share
|
||||
@ -84,6 +79,11 @@
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<a class="search-result-link" href="#/dashboard/db/{{row.id}}">
|
||||
<i class="icon icon-th-large"></i>
|
||||
<span bo-text="row.id"></span>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
||||
}
|
||||
|
||||
.search-results-container {
|
||||
max-height: 570px;
|
||||
max-height: 600px;
|
||||
overflow: auto;
|
||||
display: block;
|
||||
.search-result-item a {
|
||||
|
Loading…
Reference in New Issue
Block a user