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 %]
|
[% 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 %]
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue