Index: sitescripts/logs/template/subscriptionOverview.html |
=================================================================== |
--- a/sitescripts/logs/template/subscriptionOverview.html |
+++ b/sitescripts/logs/template/subscriptionOverview.html |
@@ -37,19 +37,20 @@ |
<td>{{now|formattime}}</td> |
</tr> |
</table> |
<div class="block_title">Monthly history</div> |
<div class="block"> |
<table align="center" style="margin-bottom: 20px;"> |
<tr align="bottom"> |
- {%- set maxHits, maxBandwidth = month|max(attribute='hits'), month|max(attribute='bandwidth') %} |
- {%- set totalHits = month|sum(attribute='hits') %} |
- {%- set totalBandwidth = month|sum(attribute='bandwidth') %} |
+ {%- set maxHits = month|max(attribute='hits')|ensuremin(1) %} |
+ {%- set maxBandwidth = month|max(attribute='bandwidth')|ensuremin(1) %} |
+ {%- set totalHits = month|sum(attribute='hits')|ensuremin(1) %} |
+ {%- set totalBandwidth = month|sum(attribute='bandwidth')|ensuremin(1) %} |
{%- for info in month %} |
<td align="center" style="vertical-align: bottom;"> |
<div class="hitsChart vertical" title="Hits: {{info.hits}}" style="height: {{(info.hits / maxHits * 100)|round(method='ceil')|int}}px;"></div> |
{{- '' -}} |
<div class="bandwidthChart vertical" title="Bandwidth: {{info.bandwidth|bytes}}" style="height: {{(info.bandwidth / maxBandwidth * 100)|round(method='ceil')|int}}px;"></div> |
</td> |
{%- endfor %} |
</tr> |