2013-09-13 13:52:13 -07:00
|
|
|
<div ng-controller='timepicker' ng-init="init()">
|
2013-09-11 15:58:53 -07:00
|
|
|
<style>
|
2013-10-09 10:36:41 +02:00
|
|
|
.timepicker-timestring {
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.timepicker-dropdown {
|
|
|
|
|
margin: 0px !important;
|
|
|
|
|
border: 0px !important;
|
2013-09-11 15:58:53 -07:00
|
|
|
}
|
|
|
|
|
</style>
|
2013-10-09 10:36:41 +02:00
|
|
|
<!-- This is a complete hack. The form actually exists in the modal, but due to transclusion
|
|
|
|
|
$scope.input isn't available on the controller unless the form element is in this file -->
|
|
|
|
|
<form name="input" style="margin:3px 0 0 0">
|
|
|
|
|
<ul class="nav nav-pills timepicker-dropdown">
|
2013-11-01 13:38:19 -07:00
|
|
|
<li class="dropdown">
|
2013-10-09 10:36:41 +02:00
|
|
|
|
2014-08-14 22:30:19 +02:00
|
|
|
<a class="dropdown-toggle timepicker-dropdown" data-toggle="dropdown" href="" bs-tooltip="time.tooltip" data-placement="bottom" ng-click="dismiss();">
|
2014-08-27 16:29:48 +02:00
|
|
|
<span ng-bind="time.rangeString"></span>
|
2014-06-07 21:00:05 +02:00
|
|
|
<span ng-show="dashboard.refresh" class="text-warning">refreshed every {{dashboard.refresh}} </span>
|
2013-10-09 10:36:41 +02:00
|
|
|
<i class="icon-caret-down"></i>
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
|
<!-- Relative time options -->
|
2014-08-06 10:39:27 +02:00
|
|
|
<li bindonce ng-repeat='timespan in panel.time_options track by $index'>
|
|
|
|
|
<a ng-click="setRelativeFilter(timespan)" bo-text="'Last ' + timespan"></a>
|
2013-10-09 10:36:41 +02:00
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<!-- Auto refresh submenu -->
|
|
|
|
|
<li class="dropdown-submenu">
|
|
|
|
|
<a href="#">Auto-Refresh</a>
|
|
|
|
|
<ul class="dropdown-menu">
|
2014-08-06 10:39:27 +02:00
|
|
|
<li>
|
2014-08-27 17:58:49 +02:00
|
|
|
<a ng-click="timeSrv.set_interval(false)">Off</a>
|
2014-08-06 10:39:27 +02:00
|
|
|
</li>
|
|
|
|
|
<li bindonce ng-repeat="interval in panel.refresh_intervals track by $index">
|
2014-08-27 17:58:49 +02:00
|
|
|
<a ng-click="timeSrv.set_interval(interval)" bo-text="'Every ' + interval"></a>
|
2014-08-06 10:39:27 +02:00
|
|
|
</li>
|
2013-10-09 10:36:41 +02:00
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
<li><a ng-click="customTime()">Custom</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
</li>
|
2014-06-07 21:00:05 +02:00
|
|
|
<li ng-show="!dashboard.refresh" class="grafana-menu-refresh">
|
2014-08-27 17:58:49 +02:00
|
|
|
<a ng-click="timeSrv.refreshDashboard()"><i class="icon-refresh"></i></a>
|
2013-10-17 13:08:04 +02:00
|
|
|
</li>
|
2013-10-09 10:36:41 +02:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|