From 2c2a714e0615d6aff3773fabfd3b93e8672a40a1 Mon Sep 17 00:00:00 2001 From: Vasilii Chernov Date: Mon, 22 Feb 2016 12:21:04 +0100 Subject: Add device html server --- pywrap/templates/base.html | 15 +++++ pywrap/templates/property_info.html | 91 ++++++++++++++++++++++++++++++ pywrap/templates/register_info.html | 106 +++++++++++++++++++++++++++++++++++ pywrap/templates/registers_list.html | 26 +++++++++ 4 files changed, 238 insertions(+) create mode 100644 pywrap/templates/base.html create mode 100644 pywrap/templates/property_info.html create mode 100644 pywrap/templates/register_info.html create mode 100644 pywrap/templates/registers_list.html (limited to 'pywrap/templates') diff --git a/pywrap/templates/base.html b/pywrap/templates/base.html new file mode 100644 index 0000000..e62dbdf --- /dev/null +++ b/pywrap/templates/base.html @@ -0,0 +1,15 @@ + +{% block title %}Device {{ device }}{% endblock %} +{% block info %} +

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

+{% endblock %} + +{% block content %} +{% endblock %} + + + diff --git a/pywrap/templates/property_info.html b/pywrap/templates/property_info.html new file mode 100644 index 0000000..912d3d5 --- /dev/null +++ b/pywrap/templates/property_info.html @@ -0,0 +1,91 @@ +{% extends "base.html" %} +{% block title %}Property list{% endblock %} +{% block info %} +

List of properties in branch {{ branch }}

+{% endblock %} + +{% block content %} + + + + + + + + + {% for property in properties %} + + {% if ('childs' in property.flags) or (properties|length != 1) %} + + {% if 'description' in property %} + + + {% else %} + + {% endif %} + {% else %} + + + {% endif %} + + {% endfor %} +
NameDescription
"{{ property.name }}"{{ property.description }}{{ property.name }}" + + {% if 'description' in property %} + + + + + {% endif %} + + + + + {% if 'W' in property.mode %} + + + + + {% endif %} + + + + + + + + + + + + + + + + +
Description {{ property.description }}
Current value {{ value }}
Set value + + +
Mode +
    + {% for m in property.mode %} +
  • {{ m }}
  • + {% endfor %} +
+
Type {{ property.type }}
Unit {{ property.unit }}
Path {{ property.path }}
+
+{% endblock %} diff --git a/pywrap/templates/register_info.html b/pywrap/templates/register_info.html new file mode 100644 index 0000000..a7f11dc --- /dev/null +++ b/pywrap/templates/register_info.html @@ -0,0 +1,106 @@ +{% extends "base.html" %} +{% block title %}Register info{% endblock %} +{% block info %} +

Register '{{ register.name }}' info

+{% endblock %} + +{% block content %} + + + + {% if 'description' in register %} + + + + + {% endif %} + + + + + {% if 'W' in register.mode %} + + + + + {% endif %} + + + + + + + + + + + + + {% if 'range' in register %} + + + + + {% endif %} + {% if 'values' in register %} + {% for v in register['values'] %} + + {% if 'name' in v %} + + {% endif %} + + + {% endfor %} + {% endif %} +
Description {{ register.description }}
Current value {{ value }}
Set value + + +
Bank{{ register.bank }}
Default value{{ register.defvalue }}
Mode +
    + {% for m in register.mode %} +
  • {{ m }}
  • + {% endfor %} +
+
+ Range + + + + + + + + + + +
min {{ register.range.min }}
max {{ register.range.max }}
+
{{v.name}} + + {% if 'description' in v %} + + + + + {% endif %} + + + + + + + + + + + + +
description {{ v.description }}
min {{ v.min }}
max {{ v.max }}
value {{ v.value }}
+
+{% endblock %} diff --git a/pywrap/templates/registers_list.html b/pywrap/templates/registers_list.html new file mode 100644 index 0000000..199475b --- /dev/null +++ b/pywrap/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 From 5085fbed88cec0bdc1b339daf9cd888e184cc32c Mon Sep 17 00:00:00 2001 From: Vasilii Chernov Date: Wed, 24 Feb 2016 14:57:16 +0100 Subject: 1. Http server add tree view 2. Pcipywrap - add lock function wraps - add dma read wrap 3. Api server implement locking functionality --- pywrap/templates/base.html | 358 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 345 insertions(+), 13 deletions(-) (limited to 'pywrap/templates') diff --git a/pywrap/templates/base.html b/pywrap/templates/base.html index e62dbdf..fdb95e8 100644 --- a/pywrap/templates/base.html +++ b/pywrap/templates/base.html @@ -1,15 +1,347 @@ - -{% block title %}Device {{ device }}{% endblock %} -{% block info %} -

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

-{% endblock %} + + + + {% block title %}Device {{ device }}{% endblock %} + + + + + + + + + + {% block info %} +

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

+ {% endblock %} + + {% block content %} + {% endblock %} + + + + + + + + + +
+

Properties Tree

+
+

Registers Tree

+
+
+
+
+
+ + -- cgit v1.2.3