Merge pull request #204 from aszlig/tail-improvements

Improvements of tail-reload output
This commit is contained in:
Eelco Dolstra 2015-04-14 12:44:36 +02:00
commit 5d8a563e90
2 changed files with 25 additions and 5 deletions

View file

@ -9,11 +9,25 @@
[% IF reload %] [% IF reload %]
<script> <script>
function scrollDown() {
$("#contents").scrollTop($("#contents").get(0).scrollHeight);
}
function injectTail() {
$.ajax({
url: "[% url %]",
dataType: "text",
success: function (tail) {
$("#contents").text(tail);
scrollDown();
}
});
}
$(document).ready(function() { $(document).ready(function() {
$("#contents").load("[% url %]"); scrollDown();
var refreshId = setInterval(function() { injectTail();
$("#contents").load("[% url %]"); setInterval(injectTail, 5000);
}, 5000);
}); });
</script> </script>
[% END %] [% END %]

View file

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