diff options
Diffstat (limited to 'foris/templates/ups_pfc8591/ups_pfc8591.tpl')
-rw-r--r-- | foris/templates/ups_pfc8591/ups_pfc8591.tpl | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/foris/templates/ups_pfc8591/ups_pfc8591.tpl b/foris/templates/ups_pfc8591/ups_pfc8591.tpl new file mode 100644 index 0000000..e2ae1ef --- /dev/null +++ b/foris/templates/ups_pfc8591/ups_pfc8591.tpl @@ -0,0 +1,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> |