{% extends "layout.jinja2" %}

{% block content %}
<div class="content">
    <div class="row">
        <div class="col-xs-12">
            <h2>Gauge Off Data</h2>
            {% if data is defined %}

            {% for d in data %}
            <h3 class="allcaps">{{d.date|date('long')}}</h3>
            <div class="table-responsive">
                <table class="table table-striped">
                    <thead>
                        <tr>
                            <th>Name</th>
                            <th>Last</th>
                            <th>Max</th>
                            <th>Min</th>
                            <th>Average</th>
                            <th>Total</th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for t in d.tags %}
                        <tr>
                            <td>{{t}}</td>
                            <td>{{d['tags'][t].last | round(3)}}</td>
                            <td>{{d['tags'][t].max | round(3)}}</td>
                            <td>{{d['tags'][t].min | round(3)}}</td>
                            <td>{{d['tags'][t].average | round(3)}}</td>
                            <td>{{d['tags'][t].total | round(3)}}</td>
                        </tr>
                        {% endfor %}
                    </tbody>
                </table>
            </div>
            {% endfor %}
            {% endif %}
        </div>
    </div>
</div>
<script type="text/javascript" src="{{request.static_url('pocwww:static/graphs.js')}}"></script>
{% endblock content %}
