1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Record script execution time

This commit is contained in:
Jeremy Stretch
2019-08-14 10:12:30 -04:00
parent 30e14db881
commit c562af3a13
3 changed files with 26 additions and 4 deletions

View File

@@ -30,12 +30,12 @@
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="run">
{% if script.log %}
{% if execution_time %}
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<strong>Script Output</strong>
<strong>Script Log</strong>
</div>
<table class="table table-hover panel-body">
<tr>
@@ -49,8 +49,17 @@
<td>{% log_level level %}</td>
<td>{{ message }}</td>
</tr>
{% empty %}
<tr>
<td colspan="3" class="text-center text-muted">
No log output
</td>
</tr>
{% endfor %}
</table>
<div class="panel-footer text-right text-muted">
<small>Exec time: {{ execution_time|floatformat:3 }}s</small>
</div>
</div>
</div>
</div>