Moved function definition out of template.

parent f35baffb
......@@ -15,6 +15,7 @@ function (angular) {
$scope.target.function = 'mean';
}
$scope.functions = ['count', 'mean', 'sum', 'min', 'max', 'mode', 'distinct', 'median', 'derivative', 'stddev', 'first', 'last'];
$scope.oldSeries = $scope.target.series;
$scope.$on('typeahead-updated', function(){
$timeout($scope.get_data);
......
......@@ -74,7 +74,11 @@
function
</li>
<li>
<select class="input-medium grafana-target-segment-input" ng-change="get_data()" ng-model="target.function" ng-options="f for f in ['count', 'mean', 'sum', 'min', 'max', 'mode', 'distinct', 'median', 'derivative', 'stddev', 'first', 'last']" ></select>
<select class="input-medium grafana-target-segment-input"
ng-change="get_data()"
ng-model="target.function"
ng-options="f for f in functions" ></select>
</li>
</li>
<li class="grafana-target-segment">
group by time
......
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