From c79d43273769d88f7129a3d53c80b85a6dc1946c Mon Sep 17 00:00:00 2001 From: Vasilii Chernov Date: Thu, 3 Mar 2016 15:38:32 +0100 Subject: 1. Pcipywrap: add persistent locking wrappings 2. html-server: - add scripts tab - change tab view to jQuery tabs --- pyserver/html_server.py | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'pyserver/html_server.py') diff --git a/pyserver/html_server.py b/pyserver/html_server.py index 22194cd..571dc4e 100644 --- a/pyserver/html_server.py +++ b/pyserver/html_server.py @@ -160,8 +160,28 @@ def get_property_list(): return render_template('property_info.html', value = value, branch = branch, - properties = prop_info, - json = json + properties = prop_info + ) + +@app.route("/scripts_info") +def get_scripts_list(): + #get properties info + prop_info = 0 + try: + r = requests.get(url_for('process_json_command', + command = 'get_scripts_list', + _external = True)) + + if(r.json().get('status') == 'error'): + return 'Error: ' + r.json()['description'] + + scripts_info = r.json()['scripts'] + + except Exception as e: + return str(e) + + return render_template('scripts_info.html', + scripts = scripts_info ) @app.route("/") -- cgit v1.2.3