mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-16 04:02:52 -06:00
Fixes #17700: Fix warning when no scripts are found within a script module
This commit is contained in:
parent
5f94dff815
commit
f00a93c066
@ -37,7 +37,8 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</h2>
|
</h2>
|
||||||
{% if module.scripts %}
|
{% with scripts=module.scripts.all %}
|
||||||
|
{% if scripts %}
|
||||||
<table class="table table-hover scripts">
|
<table class="table table-hover scripts">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -49,7 +50,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for script in module.scripts.all %}
|
{% for script in scripts %}
|
||||||
{% with last_job=script.get_latest_jobs|first %}
|
{% with last_job=script.get_latest_jobs|first %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@ -128,10 +129,12 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="alert alert-warning" role="alert">
|
<div class="alert alert-warning" role="alert">
|
||||||
<i class="mdi mdi-alert"></i> Could not load scripts from {{ module.name }}
|
<i class="mdi mdi-alert"></i>
|
||||||
|
{% blocktrans with module=module.name %}Could not load scripts from module {{ module }}{% endblocktrans %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endwith %}
|
||||||
</div>
|
</div>
|
||||||
{% empty %}
|
{% empty %}
|
||||||
<div class="alert alert-info" role="alert">
|
<div class="alert alert-info" role="alert">
|
||||||
|
Loading…
Reference in New Issue
Block a user