aboutsummaryrefslogtreecommitdiff
path: root/foris/templates/i2c_collect/i2c_collect.tpl
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-06-17 10:54:20 +0200
committerKarel Kočí <cynerd@email.cz>2017-06-17 10:54:20 +0200
commitcfc9a152f42366d6e8fecf3134a9824840c80acc (patch)
tree99da8bbf5c24a07a94600c08b3ae0923ed99ee3f /foris/templates/i2c_collect/i2c_collect.tpl
downloadturris-ups-pfc8591-cfc9a152f42366d6e8fecf3134a9824840c80acc.tar.gz
turris-ups-pfc8591-cfc9a152f42366d6e8fecf3134a9824840c80acc.tar.bz2
turris-ups-pfc8591-cfc9a152f42366d6e8fecf3134a9824840c80acc.zip
Initial commit
Diffstat (limited to 'foris/templates/i2c_collect/i2c_collect.tpl')
-rw-r--r--foris/templates/i2c_collect/i2c_collect.tpl33
1 files changed, 33 insertions, 0 deletions
diff --git a/foris/templates/i2c_collect/i2c_collect.tpl b/foris/templates/i2c_collect/i2c_collect.tpl
new file mode 100644
index 0000000..12226a5
--- /dev/null
+++ b/foris/templates/i2c_collect/i2c_collect.tpl
@@ -0,0 +1,33 @@
+
+%rebase("config/base.tpl", **locals())
+
+<div id="page-i2c-collect" 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>