sensu / sensu-dashboard

A dashboard for Sensu, for displaying & managing events & clients.
http://sensuapp.org
MIT License
96 stars 44 forks source link

Preserving whitespace (but wrapping) for event/client details. #151

Closed nstielau closed 10 years ago

nstielau commented 11 years ago

This allows checks with detailed output messages, including whitespace and newlines, to render properly in the dashboard. This does not change the UI for checks that have a simple string output. The output will wrap if necessary (the current, default whitespace behavior) but will no longer squash repeated whitespace and will render newlines as line breaks.

nstielau commented 11 years ago

Oh, hangon, I need to find a way to suppress the last newline.

nstielau commented 11 years ago

Since most checks output a trailing newline (i.e. with ruby's puts), it was causing a single trailing line-wrap in the modal output field. This strips leading/trailing whitespace from the output, so the modal output field looks the same with the new CSS as it did before (unless there is purposefully whitespace/newlines in the output body).

portertech commented 11 years ago

@amdprophet ^^

nstielau commented 10 years ago

@amdprophet ping

We've been running this for weeks and it's working well.

amdprophet commented 10 years ago

I somehow missed all the e-mail notifications for this until now. Looks good, thanks a ton for the change! :+1: