if > 100 logs, truncate them and add button to show all logs, and stop auto-refresh too
This commit is contained in:
@@ -66,6 +66,14 @@
|
|||||||
{% for log in logs %}
|
{% for log in logs %}
|
||||||
<tr><td>{{log.log_date|vicdate}}</td><td>{{log.log|safe}}</td></tr>
|
<tr><td>{{log.log_date|vicdate}}</td><td>{{log.log|safe}}</td></tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% if log_cnt > logs|length %}
|
||||||
|
<tr>
|
||||||
|
<td class="align-middle">Remaining logs truncated</td>
|
||||||
|
<td>
|
||||||
|
<button type="button" class="btn btn-info my-0 py-1" onClick="document.body.innerHTML+='<form id=_fm method=POST action={{url_for('joblog', id=job.id)}}></form>';document.getElementById('_fm').submit();">Show all logs</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -73,7 +81,7 @@
|
|||||||
{% endblock main_content %}
|
{% endblock main_content %}
|
||||||
{% block script_content %}
|
{% block script_content %}
|
||||||
<script>
|
<script>
|
||||||
{% if job.pa_job_state != "Completed" %}
|
{% if first_logs_only and job.pa_job_state != "Completed" %}
|
||||||
setTimeout(function(){ window.location.reload(1); }, 3000 )
|
setTimeout(function(){ window.location.reload(1); }, 3000 )
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user