aboutsummaryrefslogtreecommitdiff
path: root/foris/templates/ups_pfc8591/ups_pfc8591.tpl
blob: e2ae1ef62b521d9f8715074d3c0ee250c3b2a355 (plain)
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
%rebase("config/base.tpl", **locals())

<div id="page-ups-pfc8591" class="config-page">
%include("_messages.tpl")
  <div id="canvas-container">
%for fld in ["voltage", "light", "temperature", "trimmer"]:
    <canvas id="canvas-{{ fld }}"></canvas>
%end
  </div>
</div>


<script>
var graph_data = {
%for fld in ["voltage", "light", "temperature", "trimmer"]:
  "{{ fld }}": [
%	for _, val in enumerate(data[fld]):
    {{ val[1] }},
%	end
  ],
%end
};
var graph_labels = {
%for fld in ["voltage", "light", "temperature", "trimmer"]:
  "{{ fld }}": [
%	for _, val in enumerate(data[fld]):
    "{{ val[0] }}",
%	end
  ],
%end
};
</script>