From 9b947f32c3db96c3022afad401b1349205d22259 Mon Sep 17 00:00:00 2001 From: Vasilii Chernov Date: Tue, 1 Mar 2016 16:42:48 +0100 Subject: 1. api-serer: - change multiprosessing work mechanism - add new pywrap functions handling 2. html-server: - now works through api-server --- html_server/templates/base.html | 63 +++++----------------- html_server/templates/property_info.html | 6 +-- html_server/templates/registers/table_scripts.html | 8 +-- 3 files changed, 19 insertions(+), 58 deletions(-) (limited to 'html_server/templates') diff --git a/html_server/templates/base.html b/html_server/templates/base.html index 0e3aea8..a2df1e9 100644 --- a/html_server/templates/base.html +++ b/html_server/templates/base.html @@ -5,6 +5,7 @@ + @@ -13,8 +14,8 @@ function createPropertyTree(branch, id) { function getPropertyItemsOnLevel(branch, id) { - pathToProperties = "{{ url_for('get_property_list_json') }}" - completePath = pathToProperties + '?branch=' + branch + var pathToProperties = "{{ url_for('process_json_command', command = 'get_property_list') }}" + var completePath = pathToProperties + '?branch=' + branch $.getJSON(completePath, function(json) { @@ -25,6 +26,9 @@ function parsePropertyItems(json, branch, id) { + checkError(json) + json = json.properties + function loadPropertyInfo(branch) { var pathToProperties = "{{ url_for('get_property_list') }}" @@ -57,6 +61,8 @@ var regTree function createRegistersList() { function parseJsonRegisterList(json) { + checkError(json) + json = json.registers function loadRegistersList(bank) { var pathToGetRegisterList = "{{ url_for('get_registers_list') }}" @@ -129,7 +135,7 @@ } //get registers json list - getRegistersListPath = "{{ url_for('get_registers_list_json') }}" + var getRegistersListPath = "{{ url_for('process_json_command', command = 'get_registers_list') }}" $.getJSON(getRegistersListPath, parseJsonRegisterList); } @@ -152,54 +158,6 @@

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

{% endblock %} -
@@ -229,5 +187,8 @@
{% block content %} {% endblock %} +
+ Json API usage +
diff --git a/html_server/templates/property_info.html b/html_server/templates/property_info.html index 4e7c92f..62ea1ba 100644 --- a/html_server/templates/property_info.html +++ b/html_server/templates/property_info.html @@ -7,7 +7,7 @@