Commit dd4eaa07 by Torkel Ödegaard

fixes to target segment markup

parent 93550e9e
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</li> </li>
</ul> </ul>
<ul class="grafana-target-controls-left"> <ul class="grafana-segment-list">
<li class="grafana-target-segment" style="min-width: 15px; text-align: center"> <li class="grafana-target-segment" style="min-width: 15px; text-align: center">
{{targetLetter}} {{targetLetter}}
</li> </li>
......
...@@ -87,16 +87,28 @@ ...@@ -87,16 +87,28 @@
<!-- Raw Query mode --> <!-- Raw Query mode -->
<ul class="grafana-segment-list" ng-show="target.rawQuery"> <ul class="grafana-segment-list" ng-show="target.rawQuery">
<li class="grafana-target-segment"> <li class="grafana-target-segment">
<i class="icon-eye-open invisible"></i>
</li>
<li class="grafana-target-segment">
alias alias
</li> </li>
<li> <li>
<input type="text" <input type="text"
class="input-medium grafana-target-segment-input" class="input-medium grafana-target-text-input"
ng-model="target.alias" ng-model="target.alias"
spellcheck='false' spellcheck='false'
placeholder="alias" placeholder="alias"
ng-blur="get_data()"> ng-blur="get_data()">
</li> </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> </ul>
<!-- Query editor mode --> <!-- Query editor mode -->
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</li> </li>
</ul> </ul>
<ul class="grafana-target-controls-left"> <ul class="grafana-target-segment-list">
<li> <li>
<a class="grafana-target-segment" <a class="grafana-target-segment"
ng-click="target.hide = !target.hide; get_data();" ng-click="target.hide = !target.hide; get_data();"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="grafana-target-inner-wrapper"> <div class="grafana-target-inner-wrapper">
<div class="grafana-target-inner"> <div class="grafana-target-inner">
<ul class="grafana-target-controls-left"> <ul class="grafana-segment-list">
<li class="grafana-target-segment"> <li class="grafana-target-segment">
<div class="dropdown"> <div class="dropdown">
<a class="pointer" data-toggle="dropdown"> <a class="pointer" data-toggle="dropdown">
......
...@@ -61,10 +61,6 @@ function (angular, _, kbn, InfluxSeries, InfluxQueryBuilder) { ...@@ -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) { InfluxDatasource.prototype.annotationQuery = function(annotation, rangeUnparsed) {
var timeFilter = getTimeFilter({ range: rangeUnparsed }); var timeFilter = getTimeFilter({ range: rangeUnparsed });
var query = _.template(annotation.query, { timeFilter: timeFilter, "$timeFilter": timeFilter }, this.templateSettings); var query = _.template(annotation.query, { timeFilter: timeFilter, "$timeFilter": timeFilter }, this.templateSettings);
......
...@@ -70,18 +70,6 @@ define([ ...@@ -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');
});
});
}); });
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment