Commit cc5da00b by Rashid Khan

moved slice to filter, should be faster

parent 6c62a9b8
...@@ -20,4 +20,10 @@ angular.module('kibana.filters', []) ...@@ -20,4 +20,10 @@ angular.module('kibana.filters', [])
}); });
return ret; return ret;
}; };
}).filter('slice', function() {
return function(arr, start, end) {
if(!_.isUndefined(arr)) {
return arr.slice(start, end);
}
};
}); });
\ No newline at end of file
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</th> </th>
</thead> </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"> <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> <td ng-repeat="field in panel.fields" ng-bind-html-unsafe="(row.highlight[field]||row._source[field]) | highlight"></td>
</tr> </tr>
......
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