agent.html
1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{% extends "base_page.html" %}
{% block more_heads %}
<link href="{{ url_for('main.static', filename='css/charges.css', version=config.VERSION) }}" rel="stylesheet" type="text/css"/>
{% endblock %}
{% block content %}
<!-- Invisible span to definte wich ul and a in the navbar are actived -->
<span id="nav_actived" style="display: none">agent,agents</span>
<div id="projects_chart" class="charge_chart"></div>
<table id="charge_table">
<thead>
<tr>
{% for header in charges[0] %}
<th>{{header}}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for line in charges[1:] %}
<tr>
{% for i in range(line|length) %}
{%if 'Charge' in charges[0][i] %}
<td>{{line[i]}} %</td>
{%else%}
<td>{{line[i]}}</td>
{%endif%}
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}
{% block more_scripts %}
{% include 'd3js-includes.html' %}
{% include 'charges-includes.html' %}
<script>
build_chart("#projects_chart",
"{{url_for('main.charge_agent_csv', agent_id=agent.id)}}",
"{{agent.secondname}}"+ " {{agent.firstname}}",
"project");
</script>
{% endblock %}