mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fixed default panel title when creating new panel, tweaks to panel height calculation, Closes #910
This commit is contained in:
@@ -103,6 +103,7 @@ function (angular, app, _) {
|
|||||||
var _as = 12 - $scope.dashboard.rowSpan($scope.row);
|
var _as = 12 - $scope.dashboard.rowSpan($scope.row);
|
||||||
|
|
||||||
$scope.panel = {
|
$scope.panel = {
|
||||||
|
title: 'no title [click here]',
|
||||||
error : false,
|
error : false,
|
||||||
span : _as < defaultSpan && _as > 0 ? _as : defaultSpan,
|
span : _as < defaultSpan && _as > 0 ? _as : defaultSpan,
|
||||||
editable: true,
|
editable: true,
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ function (angular, $, kbn, moment, _, GraphTooltip) {
|
|||||||
height = parseInt(height.replace('px', ''), 10);
|
height = parseInt(height.replace('px', ''), 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
height = height - 32; // subtract panel title bar
|
height -= scope.panel.title ? 24 : 9; // subtract panel title bar
|
||||||
|
|
||||||
if (scope.panel.legend.show && !scope.panel.legend.rightSide) {
|
if (scope.panel.legend.show && !scope.panel.legend.rightSide) {
|
||||||
height = height - 21; // subtract one line legend
|
height = height - 21; // subtract one line legend
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
.panel-title-container {
|
.panel-title-container {
|
||||||
min-height: 5px;
|
min-height: 5px;
|
||||||
|
padding-top: 4px;
|
||||||
cursor: context-menu;
|
cursor: context-menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -24,7 +25,6 @@
|
|||||||
border: 0px;
|
border: 0px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: 0.9em;
|
|
||||||
cursor: context-menu;
|
cursor: context-menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user