From cc5da00bd0a13c87b85acb24c96cad4a5c801bd3 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Mon, 22 Jul 2013 21:50:57 -0700 Subject: [PATCH] moved slice to filter, should be faster --- js/filters.js | 6 ++++++ panels/table/module.html | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/js/filters.js b/js/filters.js index 0b6c4580bfb..0f2a3aee7e8 100644 --- a/js/filters.js +++ b/js/filters.js @@ -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); + } + }; }); \ No newline at end of file diff --git a/panels/table/module.html b/panels/table/module.html index ab70c773527..3671b721b44 100644 --- a/panels/table/module.html +++ b/panels/table/module.html @@ -34,7 +34,7 @@ - +