plain-reload: Constrain tail output to 50 lines.

There are quite a lot of build outputs which have lines with a length
exceeding the width of the taillog <pre/> and thus visually produce more
lines than 50. This causes the tail "box" to change height frequently
and to get to the bottom you need to scroll down.

We now set a fixed line-height to 120% of the font size and cap the
maximum height based on that value (50 * 1.2 = 60). It's probably not
nice to override the line-height, but max-lines is currently only
available using browser-specific property names. But after all it's just
for the tail output, if people complain about the line-height, we can
still change it :-)

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2015-04-02 17:29:48 +02:00
parent be051bcadc
commit c251598241
No known key found for this signature in database
GPG key ID: D0EBD0EC8C2DC961
2 changed files with 7 additions and 0 deletions

View file

@ -15,6 +15,7 @@ function injectTail() {
dataType: "text",
success: function (tail) {
$("#contents").text(tail);
$("#contents").scrollTop($("#contents").get(0).scrollHeight);
}
});
}

View file

@ -119,3 +119,9 @@ span.keep-whitespace {
.build-status {
max-width: none; /* don't apply responsive design to status images */
}
pre.taillog {
line-height: 1.2em;
max-height: 60em;
overflow: hidden;
}