mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fixes to target segment markup
This commit is contained in:
parent
93550e9ea5
commit
dd4eaa0758
@ -46,7 +46,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="grafana-target-controls-left">
|
||||
<ul class="grafana-segment-list">
|
||||
<li class="grafana-target-segment" style="min-width: 15px; text-align: center">
|
||||
{{targetLetter}}
|
||||
</li>
|
||||
|
@ -87,16 +87,28 @@
|
||||
<!-- Raw Query mode -->
|
||||
<ul class="grafana-segment-list" ng-show="target.rawQuery">
|
||||
<li class="grafana-target-segment">
|
||||
<i class="icon-eye-open invisible"></i>
|
||||
</li>
|
||||
<li class="grafana-target-segment">
|
||||
alias
|
||||
</li>
|
||||
<li>
|
||||
<input type="text"
|
||||
class="input-medium grafana-target-segment-input"
|
||||
class="input-medium grafana-target-text-input"
|
||||
ng-model="target.alias"
|
||||
spellcheck='false'
|
||||
placeholder="alias"
|
||||
ng-blur="get_data()">
|
||||
</li>
|
||||
<li class="grafana-target-segment">
|
||||
group by time
|
||||
</li>
|
||||
<li>
|
||||
<input type="text" class="input-mini grafana-target-text-input" ng-model="target.interval"
|
||||
spellcheck='false' placeholder="{{interval}}" data-placement="right"
|
||||
bs-tooltip="'Leave blank for auto handling based on time range and panel width'"
|
||||
ng-model-onblur ng-change="get_data()" >
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- Query editor mode -->
|
||||
|
@ -30,7 +30,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="grafana-target-controls-left">
|
||||
<ul class="grafana-target-segment-list">
|
||||
<li>
|
||||
<a class="grafana-target-segment"
|
||||
ng-click="target.hide = !target.hide; get_data();"
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="grafana-target-inner-wrapper">
|
||||
<div class="grafana-target-inner">
|
||||
|
||||
<ul class="grafana-target-controls-left">
|
||||
<ul class="grafana-segment-list">
|
||||
<li class="grafana-target-segment">
|
||||
<div class="dropdown">
|
||||
<a class="pointer" data-toggle="dropdown">
|
||||
|
@ -61,10 +61,6 @@ function (angular, _, kbn, InfluxSeries, InfluxQueryBuilder) {
|
||||
});
|
||||
};
|
||||
|
||||
InfluxDatasource.prototype._getGroupByTimeInterval = function(target, options) {
|
||||
return target.interval || options.interval;
|
||||
};
|
||||
|
||||
InfluxDatasource.prototype.annotationQuery = function(annotation, rangeUnparsed) {
|
||||
var timeFilter = getTimeFilter({ range: rangeUnparsed });
|
||||
var query = _.template(annotation.query, { timeFilter: timeFilter, "$timeFilter": timeFilter }, this.templateSettings);
|
||||
|
@ -70,18 +70,6 @@ define([
|
||||
|
||||
});
|
||||
|
||||
describe('When calculating group by time interval', function() {
|
||||
it('if blank should use auto interval', function() {
|
||||
var result = ctx.ds._getGroupByTimeInterval({}, { interval:'0.1s' });
|
||||
expect(result).to.be('0.1s');
|
||||
});
|
||||
|
||||
it('if target interval specified should use that interval', function() {
|
||||
var result = ctx.ds._getGroupByTimeInterval({interval: '10s'}, { interval:'0.1s' });
|
||||
expect(result).to.be('10s');
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user