Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update logger. Add auto-scroll #20

Merged
merged 4 commits into from
Oct 19, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added auto-scroll button
  • Loading branch information
DewGew authored Oct 18, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit a85e628bac8eaebd8dd33c22d91d88988128af73
19 changes: 18 additions & 1 deletion templates/logging.html
Original file line number Diff line number Diff line change
@@ -45,9 +45,13 @@ <h1>Logs</h1>

<div class="card-body">
<h5 class="card-title">Logs <span>| {{ user }}</span></h5>
<iframe class="logging_window"
<iframe class="logging_window" id="logging_window"
src="{{ url_for('stream')}}">
</iframe>
</br>
<form class="form-check form-switch">
<label><input class="form-check-input" type="checkbox" value="AutoScroll" id="autoScroll" label="Auto Scroll">Auto-Scroll</label>
</form>
</div>
</div>

@@ -68,3 +72,16 @@ <h5 class="card-title">Logs <span>| {{ user }}</span></h5>
</main><!-- End #main -->

{% include 'footer.html' %}
<script>
$(document).ready(function() {
//set initial state.
$('#autoScroll').val(this.checked);

$('#autoScroll').change(function() {
if(this.checked) {
setInterval('frames[0].scrollTo(0,9999999)',1000)
}
$('#autoScroll').val(this.checked);
});
});
</script>