diff --git a/src/app/directives/panelMenu.js b/src/app/directives/panelMenu.js index a4eb3bd210d..e727b57467f 100644 --- a/src/app/directives/panelMenu.js +++ b/src/app/directives/panelMenu.js @@ -13,6 +13,11 @@ function (angular, $, _) { '' + '{{panel.title | interpolateTemplateVars}}' + '' + + '' + + '' + + 'View' + + 'Edit' + + ''; ''; function createMenuTemplate($scope) { @@ -119,7 +124,7 @@ function (angular, $, _) { $menu = $(menuTemplate); $menu.css('left', menuLeftPos); $menu.mouseleave(function() { - dismiss(1000); + //dismiss(1000); }); menuScope = $scope.$new(); @@ -134,7 +139,7 @@ function (angular, $, _) { $(".panel-container").removeClass('panel-highlight'); $panelContainer.toggleClass('panel-highlight'); - dismiss(2500); + //dismiss(2500); }; if ($scope.panelMeta.titlePos && $scope.panel.title) { diff --git a/src/app/panels/graph/graph.js b/src/app/panels/graph/graph.js index e0ddfc76402..aba28e6f5ec 100755 --- a/src/app/panels/graph/graph.js +++ b/src/app/panels/graph/graph.js @@ -72,10 +72,11 @@ function (angular, $, kbn, moment, _, GraphTooltip) { height = parseInt(height.replace('px', ''), 10); } + height -= 5; // padding height -= scope.panel.title ? 24 : 9; // subtract panel title bar if (scope.panel.legend.show && !scope.panel.legend.rightSide) { - height = height - 21; // subtract one line legend + height = height - 26; // subtract one line legend } elem.css('height', height + 'px'); diff --git a/src/app/panels/singlestat/singleStatPanel.js b/src/app/panels/singlestat/singleStatPanel.js index d1131f29e94..3bd9ce54465 100644 --- a/src/app/panels/singlestat/singleStatPanel.js +++ b/src/app/panels/singlestat/singleStatPanel.js @@ -29,6 +29,7 @@ function (angular, app, _, $) { height = parseInt(height.replace('px', ''), 10); } + height -= 5; // padding height -= panel.title ? 24 : 9; // subtract panel title bar elem.css('height', height + 'px'); diff --git a/src/app/partials/submenu.html b/src/app/partials/submenu.html index e82e2505afb..d103d62ad9a 100644 --- a/src/app/partials/submenu.html +++ b/src/app/partials/submenu.html @@ -36,6 +36,19 @@ + +
diff --git a/src/css/less/panel.less b/src/css/less/panel.less index 5c3dd93c6cf..3c64013d499 100644 --- a/src/css/less/panel.less +++ b/src/css/less/panel.less @@ -10,6 +10,11 @@ background: @grafanaPanelBackground; margin: 5px; position: relative; + &:hover { + .panel-actions { + display: block; + } + } } .panel-content { @@ -27,6 +32,8 @@ font-weight: bold; position: relative; cursor: context-menu; + width: 100%; + display: block; &.has-panel-links { .panel-title-text:after { @@ -124,3 +131,21 @@ border: 1px solid @grayDark; } } + +.panel-actions { + display: none; + position: absolute; + right: 0; + top: -2px; + width: 112px; + a { + opacity: 0.35; + border: 1px solid black; + padding: 5px 10px; + font-size: 75%; + background: @grafanaTargetFuncBackground; + &:hover { + opacity: 1; + } + } +}