diff --git a/src/kibana/components/doc_table/components/table_row.js b/src/kibana/components/doc_table/components/table_row.js index a7640bcd7b509..15952844b0038 100644 --- a/src/kibana/components/doc_table/components/table_row.js +++ b/src/kibana/components/doc_table/components/table_row.js @@ -23,10 +23,11 @@ define(function (require) { * ``` */ module.directive('kbnTableRow', function ($compile) { + var noWhiteSpace = require('utils/no_white_space'); var openRowHtml = require('text!components/doc_table/components/table_row/open.html'); var detailsHtml = require('text!components/doc_table/components/table_row/details.html'); - var cellTemplate = _.template(require('text!components/doc_table/components/table_row/cell.html')); - var truncateByHeightTemplate = _.template(require('text!partials/truncate_by_height.html')); + var cellTemplate = _.template(noWhiteSpace(require('text!components/doc_table/components/table_row/cell.html'))); + var truncateByHeightTemplate = _.template(noWhiteSpace(require('text!partials/truncate_by_height.html'))); return { restrict: 'A', @@ -106,6 +107,7 @@ define(function (require) { $scope.columns.forEach(function (column) { newHtmls.push(cellTemplate({ timefield: false, + sourcefield: (column === '_source'), formatted: _displayField(row, column, true) })); }); diff --git a/src/kibana/components/doc_table/components/table_row/cell.html b/src/kibana/components/doc_table/components/table_row/cell.html index 69964385f72fa..55f1e17f0cde5 100644 --- a/src/kibana/components/doc_table/components/table_row/cell.html +++ b/src/kibana/components/doc_table/components/table_row/cell.html @@ -1,3 +1,13 @@ -> +<% +var attributes = ''; +if (timefield) { + attributes='class="discover-table-timefield" width="1%"'; +} else if (sourcefield) { + attributes='class="discover-table-sourcefield"'; +} else { + attributes='class="discover-table-datafield"'; +} +%> +> <%= formatted %> - \ No newline at end of file + diff --git a/src/kibana/components/doc_table/doc_table.less b/src/kibana/components/doc_table/doc_table.less index 6954b401b0901..699a66f948bfa 100644 --- a/src/kibana/components/doc_table/doc_table.less +++ b/src/kibana/components/doc_table/doc_table.less @@ -7,6 +7,10 @@ doc-table { margin: 5px; .flex(1, 1, 100%); + .discover-table-datafield { + white-space: pre; + } + .loading { opacity: @loading-opacity; }