فهرست منبع

Fixed unreliable trending numbers before query completes

Rashid Khan 12 سال پیش
والد
کامیت
8743a4263f
2فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 1 1
      panels/trends/module.html
  2. 2 1
      panels/trends/module.js

+ 1 - 1
panels/trends/module.html

@@ -1,6 +1,6 @@
 <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'>
       <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>

+ 2 - 1
panels/trends/module.js

@@ -164,7 +164,8 @@ angular.module('kibana.trends', [])
           $scope.$emit('render');
           if(_segment < $scope.index.length-1) 
             $scope.get_data(_segment+1,query_id)
-          
+          else
+            $scope.trends = $scope.data
         }
       });
     }