sensu / sensu-dashboard

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

Adding helper to truncate event list-item 'output'. #136

Closed nstielau closed 11 years ago

nstielau commented 11 years ago

This implements a naive and arbitrary truncation of the event 'output' attribute. This creates a nice layout for the current even list-items, while the full output is still available in the modal.

Limiting to 90 characters seems about right. And by that I mean that it fit perfectly on my laptop.

UPDATE: Here is a CSS implementation that seems OK. I guess I don't like hard-coded pixel heights, but this does the trick, and is more adaptable to different screen widths (Rather than the arbitrary character length).

What do you think?

td.output {
  line-height: 28px;
  height: 20px;
  overflow: hidden;
  display: block;
}
portertech commented 11 years ago

@amdprophet Thoughts?

amdprophet commented 11 years ago

It sounds great! I'm going to quickly try it out and then I'll merge it in.

portertech commented 11 years ago

@nstielau I need a Pantheon 11" air to test this, please send one ;)

amdprophet commented 11 years ago

Thanks! :+1: