Skip to content

Commit efb8586

Browse files
committed
Do not load the charts if no resources or no packages #300
Signed-off-by: Thomas Druez <[email protected]>
1 parent 37d325a commit efb8586

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

scanpipe/templates/scanpipe/project_detail.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,12 @@
110110
{% endif %}
111111
</section>
112112

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

119121
{% include 'scanpipe/includes/run_modal.html' %}

0 commit comments

Comments
 (0)