50 lines
1.4 KiB
Django/Jinja
50 lines
1.4 KiB
Django/Jinja
{% extends "base.html.j2" %}
|
|
{% block title %}Camétéo{% endblock %}
|
|
|
|
{% block styles %}
|
|
{{super()}}
|
|
{{ css_resources|safe }}
|
|
{{ js_resources|safe }}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{% from "bootstrap/pagination.html" import render_pagination %}
|
|
<div class="container">
|
|
|
|
{{ plot_div|safe }}
|
|
|
|
{{ render_pagination(dat) }}
|
|
|
|
<div class="table-responsive">
|
|
<table class="table table-hover">
|
|
<thead class="thead-inverse">
|
|
<tr>
|
|
<th>Date/Heure</th>
|
|
<th>Type</th>
|
|
<th>Valeur</th>
|
|
<th>Capteur</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for item in dat.items -%}
|
|
{% if item.value is number %}
|
|
<tr>
|
|
{% else %}
|
|
<tr class="warning">
|
|
{% endif %}
|
|
<td>{{ item.valdate }}</td>
|
|
<td><a href="/type_id={{ item.type_id }}">{{ item.type_id }}</a></td>
|
|
<td>{{ item.value }} {{ item.unit }}</td>
|
|
<td><a href="/sensor_id={{ item.sensor_id }}">{{ item.sensor_id }}</a></td>
|
|
</tr>
|
|
{%- endfor %}
|
|
</tbody>
|
|
</table>
|
|
{{ render_pagination(dat) }}
|
|
</div>
|
|
</div>
|
|
|
|
{{ plot_script|safe }}
|
|
|
|
{% endblock %}
|