Commit 8743a426 by Rashid Khan

Fixed unreliable trending numbers before query completes

parent eb965c4c
<kibana-panel ng-controller='trends' ng-init="init()"> <kibana-panel ng-controller='trends' ng-init="init()">
<div ng-style="panel.style" style="line-height:{{panel.style['font-size']}};display:inline-block;padding-right: 5px;" ng-repeat="query in data"> <div ng-style="panel.style" style="line-height:{{panel.style['font-size']}};display:inline-block;padding-right: 5px;" ng-repeat="query in trends">
<span ng-class="{'text-success': query.hits.new >= query.hits.old, 'text-error': query.hits.old > query.hits.new}" class='strong'> <span ng-class="{'text-success': query.hits.new >= query.hits.old, 'text-error': query.hits.old > query.hits.new}" class='strong'>
<i class='large' ng-class="{'icon-caret-up': query.hits.new >= query.hits.old, 'icon-caret-down': query.hits.old > query.hits.new}"></i> {{query.percent}}% <i class='large' ng-class="{'icon-caret-up': query.hits.new >= query.hits.old, 'icon-caret-down': query.hits.old > query.hits.new}"></i> {{query.percent}}%
</span> </span>
......
...@@ -164,7 +164,8 @@ angular.module('kibana.trends', []) ...@@ -164,7 +164,8 @@ angular.module('kibana.trends', [])
$scope.$emit('render'); $scope.$emit('render');
if(_segment < $scope.index.length-1) if(_segment < $scope.index.length-1)
$scope.get_data(_segment+1,query_id) $scope.get_data(_segment+1,query_id)
else
$scope.trends = $scope.data
} }
}); });
} }
......
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