mirror of
https://github.com/grafana/grafana.git
synced 2024-11-27 19:30:36 -06:00
Merge branch 'v3.0.x'
This commit is contained in:
commit
35c05463e7
@ -8,6 +8,7 @@ import $ from 'jquery';
|
|||||||
const TITLE_HEIGHT = 25;
|
const TITLE_HEIGHT = 25;
|
||||||
const EMPTY_TITLE_HEIGHT = 9;
|
const EMPTY_TITLE_HEIGHT = 9;
|
||||||
const PANEL_PADDING = 5;
|
const PANEL_PADDING = 5;
|
||||||
|
const PANEL_BORDER = 2;
|
||||||
|
|
||||||
import {Emitter} from 'app/core/core';
|
import {Emitter} from 'app/core/core';
|
||||||
|
|
||||||
@ -158,7 +159,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?) {
|
render(payload?) {
|
||||||
|
@ -70,9 +70,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-if="agg.type === 'filters'">
|
<div ng-if="agg.type === 'filters'">
|
||||||
<div class="gf-form-inline" ng-repeat="filter in agg.settings.filters" ng-class="{last: $last}">
|
<div class="gf-form-inline offset-width-7" ng-repeat="filter in agg.settings.filters">
|
||||||
<div class="gf-form">
|
<div class="gf-form">
|
||||||
<label class="gf-form-item width-10">Query {{$index + 1}}</label>
|
<label class="gf-form-label width-10">Query {{$index + 1}}</label>
|
||||||
<input type="text" class="gf-form-input max-width-12" ng-model="filter.query" spellcheck='false' placeholder="Lucene query" ng-blur="onChangeInternal()">
|
<input type="text" class="gf-form-input max-width-12" ng-model="filter.query" spellcheck='false' placeholder="Lucene query" ng-blur="onChangeInternal()">
|
||||||
</div>
|
</div>
|
||||||
<div class="gf-form">
|
<div class="gf-form">
|
||||||
@ -88,7 +88,7 @@
|
|||||||
|
|
||||||
<div ng-if="agg.type === 'geohash_grid'">
|
<div ng-if="agg.type === 'geohash_grid'">
|
||||||
<div class="gf-form offset-width-7">
|
<div class="gf-form offset-width-7">
|
||||||
<label class="gf-form-label">Precision</label>
|
<label class="gf-form-label width-10">Precision</label>
|
||||||
<input type="number" class="gf-form-input max-width-12" ng-model="agg.settings.precision" spellcheck='false' placeholder="3" ng-blur="onChangeInternal()">
|
<input type="number" class="gf-form-input max-width-12" ng-model="agg.settings.precision" spellcheck='false' placeholder="3" ng-blur="onChangeInternal()">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -66,7 +66,7 @@ function (angular, $, moment, _, kbn, GraphTooltip) {
|
|||||||
|
|
||||||
function getLegendHeight(panelHeight) {
|
function getLegendHeight(panelHeight) {
|
||||||
if (!panel.legend.show || panel.legend.rightSide) {
|
if (!panel.legend.show || panel.legend.rightSide) {
|
||||||
return 2;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (panel.legend.alignAsTable) {
|
if (panel.legend.alignAsTable) {
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
<div class="singlestat-panel">
|
<div class="singlestat-panel">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
|
||||||
|
@ -275,10 +275,13 @@ class SingleStatCtrl extends MetricsPanelCtrl {
|
|||||||
var panel = ctrl.panel;
|
var panel = ctrl.panel;
|
||||||
var templateSrv = this.templateSrv;
|
var templateSrv = this.templateSrv;
|
||||||
var data, linkInfo;
|
var data, linkInfo;
|
||||||
|
var width, height;
|
||||||
var $panelContainer = elem.find('.panel-container');
|
var $panelContainer = elem.find('.panel-container');
|
||||||
elem = elem.find('.singlestat-panel');
|
elem = elem.find('.singlestat-panel');
|
||||||
|
|
||||||
function setElementHeight() {
|
function setElementHeight() {
|
||||||
|
width = elem.width();
|
||||||
|
height = elem.height();
|
||||||
elem.css('height', ctrl.height + 'px');
|
elem.css('height', ctrl.height + 'px');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,8 +335,6 @@ class SingleStatCtrl extends MetricsPanelCtrl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var plotCanvas = $('<div></div>');
|
var plotCanvas = $('<div></div>');
|
||||||
var width = elem.width();
|
|
||||||
var height = elem.height();
|
|
||||||
var plotCss = {
|
var plotCss = {
|
||||||
top: '10px',
|
top: '10px',
|
||||||
margin: 'auto',
|
margin: 'auto',
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.singlestat-panel-value-container {
|
.singlestat-panel-value-container {
|
||||||
padding: 20px;
|
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
Loading…
Reference in New Issue
Block a user