From ee86d24797b65bcd74358afc179155d5492ad422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 20 May 2016 10:31:22 +0200 Subject: [PATCH 1/2] fix(elasticsearch): minor editor layout fix --- .../datasource/elasticsearch/partials/bucket_agg.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html b/public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html index 75979226963..36e914d06e0 100644 --- a/public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html +++ b/public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html @@ -70,9 +70,9 @@
-
+
- +
@@ -88,7 +88,7 @@
- +
From f00cbc0aebfdaa736877ce4828f7d6146ec55a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 20 May 2016 12:23:26 +0200 Subject: [PATCH 2/2] fix(panel height): fixed issue with singlestat height, fixes #4679, fixes #4894, fixes #5113 --- public/app/features/panel/panel_ctrl.ts | 3 ++- public/app/plugins/panel/graph/graph.js | 2 +- public/app/plugins/panel/singlestat/module.html | 1 - public/app/plugins/panel/singlestat/module.ts | 5 +++-- public/sass/components/_panel_singlestat.scss | 1 - 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/app/features/panel/panel_ctrl.ts b/public/app/features/panel/panel_ctrl.ts index 82e19f8681b..73aefb4c1bd 100644 --- a/public/app/features/panel/panel_ctrl.ts +++ b/public/app/features/panel/panel_ctrl.ts @@ -8,6 +8,7 @@ import $ from 'jquery'; const TITLE_HEIGHT = 25; const EMPTY_TITLE_HEIGHT = 9; const PANEL_PADDING = 5; +const PANEL_BORDER = 2; import {Emitter} from 'app/core/core'; @@ -141,7 +142,7 @@ export class PanelCtrl { } } - this.height = this.containerHeight - (PANEL_PADDING + (this.panel.title ? TITLE_HEIGHT : EMPTY_TITLE_HEIGHT)); + this.height = this.containerHeight - (PANEL_BORDER + PANEL_PADDING + (this.panel.title ? TITLE_HEIGHT : EMPTY_TITLE_HEIGHT)); } render(payload?) { diff --git a/public/app/plugins/panel/graph/graph.js b/public/app/plugins/panel/graph/graph.js index 562bf71c947..86ad3b5f025 100755 --- a/public/app/plugins/panel/graph/graph.js +++ b/public/app/plugins/panel/graph/graph.js @@ -66,7 +66,7 @@ function (angular, $, moment, _, kbn, GraphTooltip) { function getLegendHeight(panelHeight) { if (!panel.legend.show || panel.legend.rightSide) { - return 2; + return 0; } if (panel.legend.alignAsTable) { diff --git a/public/app/plugins/panel/singlestat/module.html b/public/app/plugins/panel/singlestat/module.html index 599e8724159..75a35374566 100644 --- a/public/app/plugins/panel/singlestat/module.html +++ b/public/app/plugins/panel/singlestat/module.html @@ -1,4 +1,3 @@
-
diff --git a/public/app/plugins/panel/singlestat/module.ts b/public/app/plugins/panel/singlestat/module.ts index 9fa3e8e39c6..d8a623b7ac1 100644 --- a/public/app/plugins/panel/singlestat/module.ts +++ b/public/app/plugins/panel/singlestat/module.ts @@ -234,10 +234,13 @@ class SingleStatCtrl extends MetricsPanelCtrl { var panel = ctrl.panel; var templateSrv = this.templateSrv; var data, linkInfo; + var width, height; var $panelContainer = elem.find('.panel-container'); elem = elem.find('.singlestat-panel'); function setElementHeight() { + width = elem.width(); + height = elem.height(); elem.css('height', ctrl.height + 'px'); } @@ -291,8 +294,6 @@ class SingleStatCtrl extends MetricsPanelCtrl { } var plotCanvas = $('
'); - var width = elem.width(); - var height = elem.height(); var plotCss = { top: '10px', margin: 'auto', diff --git a/public/sass/components/_panel_singlestat.scss b/public/sass/components/_panel_singlestat.scss index fac2f716674..48d0a29f4b8 100644 --- a/public/sass/components/_panel_singlestat.scss +++ b/public/sass/components/_panel_singlestat.scss @@ -5,7 +5,6 @@ } .singlestat-panel-value-container { - padding: 20px; display: table-cell; vertical-align: middle; text-align: center;