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 %]
<script>
$(document).ready(function() {
$("#contents").load("[% url %]");
var refreshId = setInterval(function() {
$("#contents").load("[% url %]");
}, 5000);
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() {
scrollDown();
injectTail();
setInterval(injectTail, 5000);
});
</script>
[% END %]

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;
}