Skip to content

Commit

Permalink
Do not load the charts if no resources or no packages #300
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Druez <tdruez@nexb.com>
  • Loading branch information
tdruez committed Nov 2, 2022
1 parent 26daab9 commit 6616cad
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scanpipe/templates/scanpipe/project_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,12 @@
{% endif %}
</section>

<section id="charts" class="mx-5 pt-5" hx-get="{% url 'project_charts' project.uuid %}" hx-trigger="load">
<i class="fas fa-spinner fa-pulse" aria-hidden="true"></i>
Loading the charts...
</section>
{% if project.resource_count or project.package_count %}
<section id="charts" class="mx-5 pt-5" hx-get="{% url 'project_charts' project.uuid %}" hx-trigger="load">
<i class="fas fa-spinner fa-pulse" aria-hidden="true"></i>
Loading the charts...
</section>
{% endif %}
</div>

{% include 'scanpipe/includes/run_modal.html' %}
Expand Down

0 comments on commit 6616cad

Please # to comment.