From: Philipp Klaus Date: Sat, 23 Sep 2017 03:57:40 +0000 (+0800) Subject: DASH: new /pv/ details page X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=14d8ce969aafe34fe603aac6a6433d27f056dc56;p=mvd_epics.git DASH: new /pv/ details page --- diff --git a/python_suite/dashboard/dashboard.py b/python_suite/dashboard/dashboard.py index ed3622f..a842c73 100755 --- a/python_suite/dashboard/dashboard.py +++ b/python_suite/dashboard/dashboard.py @@ -173,6 +173,11 @@ def json_replace_nan(): def index(): redirect('/list_bs/general_overview') +@route('/pv/') +@view('pv_details_bootstrap.jinja2') +def pv_details(pv_name): + return {'pv_name': pv_name, 'config': CONFIG} + @route('/list_bs/') @view('pv_overview_bootstrap.jinja2') def list_pvs_bs(page): diff --git a/python_suite/dashboard/views/pv_details_bootstrap.jinja2 b/python_suite/dashboard/views/pv_details_bootstrap.jinja2 new file mode 100644 index 0000000..bc23dd7 --- /dev/null +++ b/python_suite/dashboard/views/pv_details_bootstrap.jinja2 @@ -0,0 +1,74 @@ +{% extends "base_bootstrap.jinja2" %} + +{% block title %}PV Details {{ pv_name }}{% endblock %} + +{% block header %} + + + + + +{% endblock %} + +{% block content %} +

Process Variable Details

+

{{ pv_name }}

+{% set PV = config.PVs[config.PV_lookup[pv_name]] %} +
+
+
{{ PV.alias or PV.name }}
+
+ PV + +
+
+ + {% if 'switch' in PV.classes %} + + {% else %} + {% if PV.precision is number %} + {{ ("%."+PV.precision|string +"f") % PV.value }} + {% else %} + {{ PV.value }} + {% endif %} + {% endif %} + + {{ PV.unit }} +
+
+
+ {% for key in PV %} +
+
{{ key }}
+
{{ PV[key] }}
+
+ {% endfor %} +
+
+{% endblock %} + + +{% block js_end_of_page %} +/* +$(function() { + // on page load + updateSparklines(); +}); +*/ +updateSparklines(); +{% endblock %}