From: Ole Artz Date: Thu, 10 Aug 2017 12:32:53 +0000 (+0200) Subject: DASH: visualize alarm modes, integrate Low Voltage X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=f12e2e3adcd385a6cdf6cf9152315ff105669e28;p=mvd_epics.git DASH: visualize alarm modes, integrate Low Voltage --- diff --git a/python_suite/dashboard/dashboard.py b/python_suite/dashboard/dashboard.py index fbab302..1af4276 100755 --- a/python_suite/dashboard/dashboard.py +++ b/python_suite/dashboard/dashboard.py @@ -19,12 +19,14 @@ def update_values(): epics.MINOR_ALARM : "minor_alarm", epics.MAJOR_ALARM : "major_alarm", epics.INVALID_ALARM : "invalid_alarm", + None : "disconnected", } pv['classes'] = class_map[p.severity] if 'enum' in p.type: pv['value'] = p.get(as_string=True) else: pv['value'] = p.get() + if pv['value'] is None: pv['value'] = '- disconnected -' pv['unit'] = p.units or '' @route('/') diff --git a/python_suite/dashboard/example.config.json b/python_suite/dashboard/example.config.json index 6a66a6d..d5355cf 100644 --- a/python_suite/dashboard/example.config.json +++ b/python_suite/dashboard/example.config.json @@ -26,6 +26,39 @@ {"name": "CBM:MVD:VACUUM:RECIPIENT:3:Pressure"}, {"name": "CBM:MVD:VACUUM:RECIPIENT:3:Status"} ] + }, + { + "name": "Low Voltage", + "PVs": [ + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:GetGeneralOutput"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN1:GetOutput"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN2:GetOutput"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN3:GetOutput"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN1:GetVoltage"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN2:GetVoltage"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN3:GetVoltage"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN1:GetCurrent"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN2:GetCurrent"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN3:GetCurrent"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN1:MeasuredVoltage"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN2:MeasuredVoltage"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN3:MeasuredVoltage"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN1:MeasuredCurrent"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN2:MeasuredCurrent"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN3:MeasuredCurrent"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN1:GetOVPVoltage"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN2:GetOVPVoltage"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN3:GetOVPVoltage"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN1:GetOVPVoltageMin"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN2:GetOVPVoltageMin"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN3:GetOVPVoltageMin"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN1:GetOVPVoltageMax"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN2:GetOVPVoltageMax"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN3:GetOVPVoltageMax"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN1:GetOVPMode"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN2:GetOVPMode"}, + {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN3:GetOVPMode"} + ] } - ] + ] } diff --git a/python_suite/dashboard/static/css/style.css b/python_suite/dashboard/static/css/style.css index 521017b..4503e0f 100644 --- a/python_suite/dashboard/static/css/style.css +++ b/python_suite/dashboard/static/css/style.css @@ -4,23 +4,65 @@ margin-left: auto; margin-right: auto; } -.header img { +.header .cbm { + position: relative; + bottom: -5px; float: left; width: 93px; height: 120px; } +.header .ikf { + position: relative; + bottom: -5px; + float: right; + width: 264px; + height: 120px; +} + .header h1 { position: center; left: 30px; background-color: #0509fc; color: white; + height: 130px; + text-align: center; } + .Cooling table, th, td { border: 1px solid black; } + .Cooling table, th { text-align: left; } + +.invalid_alarm:after { + content: "invalid"; + position: relative; + float: right; + color: #0091FF; +} .invalid_alarm { - background-color: red; + border-color: #0091FF; +} + +.minor_alarm:after { + content: "MINOR"; + position: relative; + float: right; + color: #FF6F00; +} +.minor_alarm { + border-color: #FF6F00; + +} +.major_alarm:after { + content: "MAJOR"; + position: relative; + float: right; + color: #FF0000; +} +.major_alarm { + border-color: #FF0000; } + diff --git a/python_suite/dashboard/static/images/ikf_logo.png b/python_suite/dashboard/static/images/ikf_logo.png new file mode 100644 index 0000000..996cfed Binary files /dev/null and b/python_suite/dashboard/static/images/ikf_logo.png differ diff --git a/python_suite/dashboard/views/pv_overview.jinja2 b/python_suite/dashboard/views/pv_overview.jinja2 index e91946e..261e665 100644 --- a/python_suite/dashboard/views/pv_overview.jinja2 +++ b/python_suite/dashboard/views/pv_overview.jinja2 @@ -1,16 +1,16 @@ PRESTO - OVERVIEW - +
- logo -

PRESTO - Overview
Prototype of the Second Station of the Micro Vertex Detector -
of the Compressed Baryonic Matter

+ logo + logo +

PRESTO - Overview
Prototype of the Second Station of the Micro Vertex Detector of the Compressed Baryonic Matter

{% for group in groups %}