From 1f2f5af647951d6b00dafe7cee810b727f570d94 Mon Sep 17 00:00:00 2001 From: Quentin Barbe Date: Wed, 19 Jun 2013 10:57:00 +0200 Subject: [PATCH] Properly display multiline values in table panel --- panels/table/module.html | 4 ++-- panels/table/module.js | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/panels/table/module.html b/panels/table/module.html index ab70c773527eb..9fb7ef75d359c 100644 --- a/panels/table/module.html +++ b/panels/table/module.html @@ -52,7 +52,7 @@ - {{value}} + @@ -73,4 +73,4 @@ - \ No newline at end of file + diff --git a/panels/table/module.js b/panels/table/module.js index a9d6989edf9fd..66cf07c0c756a 100644 --- a/panels/table/module.js +++ b/panels/table/module.js @@ -281,4 +281,16 @@ angular.module('kibana.table', []) } return ''; } +}) +.filter('endofline', function(){ + return function(text){ + if (!_.isUndefined(text) && !_.isNull(text) && text.toString().length > 0) { + return text.toString(). + replace(/&/g, '&'). + replace(//g, '>'). + replace(/\r?\n/g, '
') + } + return ''; + } });