moved slice to filter, should be faster
This commit is contained in:
@@ -20,4 +20,10 @@ angular.module('kibana.filters', [])
|
||||
});
|
||||
return ret;
|
||||
};
|
||||
}).filter('slice', function() {
|
||||
return function(arr, start, end) {
|
||||
if(!_.isUndefined(arr)) {
|
||||
return arr.slice(start, end);
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -34,7 +34,7 @@
|
||||
</th>
|
||||
|
||||
</thead>
|
||||
<tbody ng-repeat="row in data.slice(panel.offset,panel.offset+panel.size)" ng-class-odd="'odd'">
|
||||
<tbody ng-repeat="row in data | slice:panel.offset:panel.offset+panel.size" ng-class-odd="'odd'">
|
||||
<tr ng-click="toggle_details(row)" class="pointer">
|
||||
<td ng-repeat="field in panel.fields" ng-bind-html-unsafe="(row.highlight[field]||row._source[field]) | highlight"></td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user