Added interval options to panel

This commit is contained in:
Rashid Khan 2013-09-19 21:47:49 -07:00
parent 0bb80aeb5f
commit b1948b2d4b
2 changed files with 2 additions and 1 deletions

View File

@ -54,7 +54,7 @@
<input type="checkbox" ng-model="panel.percentage" ng-checked="panel.percentage" ng-change="render()">
</span>
<span>
<label class="small">Interval</label> <select ng-change="set_interval(panel.interval);get_data();" class="input-small" ng-model="panel.interval" ng-options="interval_label(time) for time in _.union([panel.interval],['auto','1s','1m','5m','10m','30m','1h','3h','12h','1d','1w','1M','1y'])"></select>
<label class="small">Interval</label> <select ng-change="set_interval(panel.interval);get_data();" class="input-small" ng-model="panel.interval" ng-options="interval_label(time) for time in _.union([panel.interval],panel.intervals)"></select>
</span>
</form>
<center><img ng-show='panel.loading && _.isUndefined(data)' src="img/load_big.gif"></center>

View File

@ -84,6 +84,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
auto_int : true,
resolution : 100,
interval : '5m',
intervals : ['auto','1s','1m','5m','10m','30m','1h','3h','12h','1d','1w','1M','1y'],
fill : 0,
linewidth : 3,
timezone : 'browser', // browser, utc or a standard timezone