forked from lix-project/hydra
Merge pull request #204 from aszlig/tail-improvements
Improvements of tail-reload output
This commit is contained in:
commit
5d8a563e90
|
@ -9,11 +9,25 @@
|
|||
|
||||
[% IF reload %]
|
||||
<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() {
|
||||
$("#contents").load("[% url %]");
|
||||
var refreshId = setInterval(function() {
|
||||
$("#contents").load("[% url %]");
|
||||
}, 5000);
|
||||
scrollDown();
|
||||
injectTail();
|
||||
setInterval(injectTail, 5000);
|
||||
});
|
||||
</script>
|
||||
[% END %]
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue