Commit fee44d83 by Torkel Ödegaard

Small timepicker angular binding perf improvement

parent d70c81f0
......@@ -14,6 +14,7 @@ function (angular, $, config, _) {
$scope, $rootScope, dashboardKeybindings, filterSrv, dashboard, panelMoveSrv, timer) {
$scope.editor = { index: 0 };
$scope.panelNames = config.panels;
$scope.init = function() {
$scope.availablePanels = config.panels;
......
<div ng-controller='text' ng-init="init()" style="min-height:{{panel.height || row.height}}" ng-dblclick="openEditor()">
<div ng-controller='text' ng-init="init()" style="min-height:{{panel.height || row.height}}">
<p ng-bind-html="content">
</p>
</div>
......@@ -8,5 +8,11 @@
<label class="small">Auto-refresh options <small>comma seperated</small></label>
<input type="text" array-join class="input-xlarge" ng-model="panel.refresh_intervals">
</div>
<p>
<br>
<i class="icon-info-sign"></i>
For these changes to fully take effect save and reload the dashboard.
</i>
</div>
</div>
......@@ -31,16 +31,20 @@
<ul class="dropdown-menu">
<!-- Relative time options -->
<li ng-repeat='timespan in panel.time_options track by $index'>
<a ng-click="setRelativeFilter(timespan)">Last {{timespan}}</a>
<li bindonce ng-repeat='timespan in panel.time_options track by $index'>
<a ng-click="setRelativeFilter(timespan)" bo-text="'Last ' + timespan"></a>
</li>
<!-- Auto refresh submenu -->
<li class="dropdown-submenu">
<a href="#">Auto-Refresh</a>
<ul class="dropdown-menu">
<li><a ng-click="dashboard.set_interval(false)">Off</a></li>
<li ng-repeat="interval in panel.refresh_intervals track by $index"><a ng-click="dashboard.set_interval(interval)">Every {{interval}}</a></li>
<li>
<a ng-click="dashboard.set_interval(false)">Off</a>
</li>
<li bindonce ng-repeat="interval in panel.refresh_intervals track by $index">
<a ng-click="dashboard.set_interval(interval)" bo-text="'Every ' + interval"></a>
</li>
</ul>
</li>
<li><a ng-click="customTime()">Custom</a></li>
......
......@@ -53,8 +53,9 @@
<li class="dropdown-submenu">
<a href="javascript:void(0);">Add Panel</a>
<ul class="dropdown-menu">
<li><a ng-click="add_panel_default('graph')">Graph</a></li>
<li><a ng-click="add_panel_default('text')">Text</a></li>
<li bindonce ng-repeat="name in panelNames">
<a ng-click="add_panel_default(name)" bo-text="name"></a>
</li>
</ul>
</li>
<li class="dropdown-submenu">
......
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