Redash: Newlines and tabs stripped out of strings in dashboards.

Created on 3 Jul 2018  路  3Comments  路  Source: getredash/redash

Hi,

I'm having a table holding logs which I want to present in redash query/dashboard. Problem is the log is stripped of newlines and tabs so it's really difficult to view it right. Is there any solution for that?

Frontend Visualizations

Most helpful comment

@idoDavid you could try to add some html to you query, like this:

SELECT '<pre class="bg-white p-0 b-0">' || log_column || '</pre>' AS log_column
FROM table

This will wrap value with <pre> tag with white background (bg-white), without border (b-0) and additional padding (p-0).

All 3 comments

@kravets-levko is there a simple way to make the table preserve things like line breaks?

@idoDavid you could try to add some html to you query, like this:

SELECT '<pre class="bg-white p-0 b-0">' || log_column || '</pre>' AS log_column
FROM table

This will wrap value with <pre> tag with white background (bg-white), without border (b-0) and additional padding (p-0).

@kravets-levko worked like a charm, thanks!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yalisassoon picture yalisassoon  路  4Comments

WesleyBatista picture WesleyBatista  路  4Comments

GitSumito picture GitSumito  路  3Comments

grugnog picture grugnog  路  4Comments

hereischris picture hereischris  路  4Comments