You've already forked snikket-web-portal
Correctly detect presence of storage metric
If there have been no uploads yet, the metric will be zero, so the if condition would fail the test, so it would render as "unknown".
This commit is contained in:
@@ -70,7 +70,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>{% trans %}Storage used by shared files{% endtrans %}</dt>
|
<dt>{% trans %}Storage used by shared files{% endtrans %}</dt>
|
||||||
<dd>
|
<dd>
|
||||||
{%- if metrics.prosody_uploads -%}
|
{%- if metrics.prosody_uploads | default(None) is not none -%}
|
||||||
{{ metrics.prosody_uploads | format_bytes }}
|
{{ metrics.prosody_uploads | format_bytes }}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
<em>{% trans %}unknown{% endtrans %}</em>
|
<em>{% trans %}unknown{% endtrans %}</em>
|
||||||
|
|||||||
Reference in New Issue
Block a user