From 3bf5383a7ea03c5aa263aa4d8acf8b4949547319 Mon Sep 17 00:00:00 2001 From: Vasilii Chernov Date: Thu, 25 Feb 2016 17:02:35 +0100 Subject: Move html_server to separate folder. Update html server templates. --- html_server/templates/base.html | 219 ++++++++++++++++++++++++++++++ html_server/templates/property_info.html | 93 +++++++++++++ html_server/templates/register_info.html | 148 ++++++++++++++++++++ html_server/templates/registers_list.html | 26 ++++ 4 files changed, 486 insertions(+) create mode 100644 html_server/templates/base.html create mode 100644 html_server/templates/property_info.html create mode 100644 html_server/templates/register_info.html create mode 100644 html_server/templates/registers_list.html (limited to 'html_server/templates') diff --git a/html_server/templates/base.html b/html_server/templates/base.html new file mode 100644 index 0000000..639dc00 --- /dev/null +++ b/html_server/templates/base.html @@ -0,0 +1,219 @@ + + + + {% block title %}Device {{ device }}{% endblock %} + + + + + + + + + + {% block info %} +
+

Device {{ device }} model={{ model }} control page

+
+ {% endblock %} + + + +
+ + + + +
+ + + + +
+
+
+
+
+
+ + + + +
+
+
+
+
+
+ {% block content %} + {% endblock %} + + diff --git a/html_server/templates/property_info.html b/html_server/templates/property_info.html new file mode 100644 index 0000000..ce974ac --- /dev/null +++ b/html_server/templates/property_info.html @@ -0,0 +1,93 @@ +{% block content %} + +{% if standalone %} + + +{% endif %} + + + + + + + + + + + + + + {% for property in properties %} + + + + + + + + + + {% endfor %} +
NameDescriptionValueModeTypeUnitPath
{{ property.name }} + {% if 'description' in property %} + {{ property.description }} + {% endif %} + + + + + {% if 'R' in property.mode %} + + {% endif %} + + {% if 'W' in property.mode %} + + + + + {% endif %} +
+ {{ value }} + + +
+ + + +
+
+
    + {% for m in property.mode %} + {{ m + '; '}} + {% endfor %} +
+
{{ property.type }} {{ property.unit }} {{ property.path }}
+{% endblock %} diff --git a/html_server/templates/register_info.html b/html_server/templates/register_info.html new file mode 100644 index 0000000..1118dbf --- /dev/null +++ b/html_server/templates/register_info.html @@ -0,0 +1,148 @@ +{% block content %} + +{% if standalone %} + + +{% endif %} + + + + + + {% if 'description' in register %} + + {% endif %} + + + + + {% if 'range' in register %} + + {% endif %} + {% if 'values' in register %} + + {% endif %} + + + + {% if 'description' in register %} + + {% endif %} + + + + + {% if 'range' in register %} + + {% endif %} + {% if 'values' in register %} + + {% endif %} + +
Description Value Default valueBankModeRangeValues
{{ register.description }} + + + + {% if 'R' in register.mode %} + + {% endif %} + + {% if 'W' in register.mode %} + + + + + {% endif %} +
{{ value }} + +
+ + + +
+
{{ register.defvalue }}{{ register.bank }} +
    + {% for m in register.mode %} + {{ m + '; '}} + {% endfor %} +
+
+ + + + + + + + + +
min max
{{ register.range.min }} {{ register.range.max }}
+
+ + + {% for v in register['values'] %} + + {% endfor %} + +
+ + {% if 'name' in v %} + + + + + {% endif %} + {% if 'description' in v %} + + + + + {% endif %} + + + + + + + + + + + + +
Name {{v.name}}
Description {{ v.description }}
Min {{ v.min }}
Max {{ v.max }}
Value {{ v.value }}
+
+
+{% endblock %} diff --git a/html_server/templates/registers_list.html b/html_server/templates/registers_list.html new file mode 100644 index 0000000..199475b --- /dev/null +++ b/html_server/templates/registers_list.html @@ -0,0 +1,26 @@ +{% extends "base.html" %} +{% block title %}Registers list{% endblock %} +{% block info %} +

List of aviable registers

+{% endblock %} + +{% block content %} + + + + + +{% for register in registers %} + + + {% if 'description' in register %} + + {% else %} + + {% endif %} + +{% endfor %} +
NameDescription
{{ register.name }}{{ register.description }}
+{% endblock %} + + -- cgit v1.2.3