mirror of
https://github.com/YunoHost/yunorunner.git
synced 2024-09-03 20:05:52 +02:00
Add a checkbox to auto-scroll logs on job view
This commit is contained in:
parent
d92a9351fb
commit
1fd5a437ab
1 changed files with 10 additions and 0 deletions
|
@ -26,6 +26,10 @@
|
|||
|
||||
<h2 class="subtitle">Execution log:</h2>
|
||||
<pre class="consoleOutput" v-html="logWithColors"></pre>
|
||||
<div style="float:right">
|
||||
<input type="checkbox" id="auto_scroll" name="auto_scroll" value="">
|
||||
<label for="auto_scroll"> Auto-scroll</label>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<% endblock %>
|
||||
|
@ -77,6 +81,12 @@
|
|||
Vue.set(app.job, "deleted", true);
|
||||
Vue.set(app.job, "state", "deleted");
|
||||
}
|
||||
|
||||
if ($("#auto_scroll")[0].checked === true)
|
||||
{
|
||||
var elem = $(".consoleOutput")[0];
|
||||
elem.scrollTop = elem.scrollHeight;
|
||||
}
|
||||
};
|
||||
})()
|
||||
</script>
|
||||
|
|
Loading…
Add table
Reference in a new issue