Skip to content
This repository was archived by the owner on Jan 8, 2024. It is now read-only.

Commit 6848325

Browse files
committed
Disable Pfc label if there's no instance in debug page
1 parent 80bba0f commit 6848325

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Resources/views/data_collector/template.html.twig

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@
4040
{% endblock %}
4141

4242
{% block menu %}
43-
<span class="label">
43+
<span class="label{% if collector.stats|length == 0 %} disabled{% endif %}">
4444
<span class="icon">{{ include('@phpFastCache/data_collector/icon.svg') }}</span>
4545
<strong>PhpFastCache</strong>
46-
<span class="count">
47-
<span>{{ collector.stats|length }}</span>
48-
</span>
46+
{% if collector.stats|length > 0 %}
47+
<span class="count">
48+
<span>{{ collector.stats|length }}</span>
49+
</span>
50+
{% endif %}
4951
</span>
5052
{% endblock %}
5153

0 commit comments

Comments
 (0)