Fixes dashboard for empty arrays
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<h2>Latest Tag Values</h2>
|
||||
{% if tag_values|length > 0 %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
@@ -21,7 +22,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if tag_values.length > 0}
|
||||
|
||||
{% for t in tag_values %}
|
||||
<tr>
|
||||
<td><a href="/values/tag/{{t._id}}">{{t._id}}</a></td>
|
||||
@@ -41,18 +42,24 @@
|
||||
<td>{{t.total | round(3)}}</td> -->
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<h3>No tag values yet...</h3>
|
||||
{% endif %}
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<h2>Latest Card</h2>
|
||||
{% if latest_card %}
|
||||
{% if latest_card|length > 0 %}
|
||||
<h3>{{latest_card.timestamp | datetime('long')}}</h1>
|
||||
<div class="surfacecard card"></div>
|
||||
<div class="downholecard card"></div>
|
||||
{% else %}
|
||||
<h3>No card data yet...</h3>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user