From 8a3ae2075115c67c8768afcca52ab7cdad7da792 Mon Sep 17 00:00:00 2001 From: Ole Artz Date: Fri, 11 Aug 2017 14:41:39 +0200 Subject: [PATCH] DASH: differt style changes / more PVs --- python_suite/dashboard/dashboard.py | 3 ++- python_suite/dashboard/example.config.json | 18 +++++++++++++- python_suite/dashboard/static/css/style.css | 27 ++++++++++++--------- 3 files changed, 34 insertions(+), 14 deletions(-) diff --git a/python_suite/dashboard/dashboard.py b/python_suite/dashboard/dashboard.py index 1af4276..6063d6b 100755 --- a/python_suite/dashboard/dashboard.py +++ b/python_suite/dashboard/dashboard.py @@ -28,7 +28,8 @@ def update_values(): pv['value'] = p.get() if pv['value'] is None: pv['value'] = '- disconnected -' pv['unit'] = p.units or '' - + if pv['value'] == 'OFF': pv['value'] = '- OFF -' + if pv['value'] == 'ON': pv['value'] = '- ON -' @route('/') @view('pv_overview.jinja2') def index(): diff --git a/python_suite/dashboard/example.config.json b/python_suite/dashboard/example.config.json index d5355cf..dcc62e0 100644 --- a/python_suite/dashboard/example.config.json +++ b/python_suite/dashboard/example.config.json @@ -1,5 +1,11 @@ { "groups": [ + { + "name": "EXAMPLE", + "PVs": [ + {"name": "CBM:MVD:EXAMPLE:DISCONECTED_EXAMPLE"} + ] + }, { "name": "Cooling", "PVs": [ @@ -59,6 +65,16 @@ {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN2:GetOVPMode"}, {"name": "CBM:MVD:POWER:PRESTO_RECIPIENT:CHAN3:GetOVPMode"} ] + }, + { + "name": "Enviroment", + "PVs": [ + {"name": "CBM:MVD:ENVIRON:OPUS20_CLEANROOM:Temperature"}, + {"name": "CBM:MVD:ENVIRON:OPUS20_CLEANROOM:Dewpoint"}, + {"name": "CBM:MVD:ENVIRON:OPUS20_CLEANROOM:AbsoluteHumidity"}, + {"name": "CBM:MVD:ENVIRON:OPUS20_CLEANROOM:RelativeHumidity"}, + {"name": "CBM:MVD:ENVIRON:OPUS20_CLEANROOM:BatteryVoltage"} + ] } - ] + ] } diff --git a/python_suite/dashboard/static/css/style.css b/python_suite/dashboard/static/css/style.css index 4503e0f..78969f5 100644 --- a/python_suite/dashboard/static/css/style.css +++ b/python_suite/dashboard/static/css/style.css @@ -5,19 +5,19 @@ margin-right: auto; } .header .cbm { + padding-left: 5px; position: relative; bottom: -5px; float: left; - width: 93px; - height: 120px; + height: 120px; /*orginal 324px*/ } .header .ikf { + padding-right: 5px; position: relative; bottom: -5px; float: right; - width: 264px; - height: 120px; -} + height: 120px; /*orginal 327px*/ +} .header h1 { position: center; @@ -37,32 +37,35 @@ } .invalid_alarm:after { - content: "invalid"; + content: "- invalid -"; position: relative; float: right; color: #0091FF; } .invalid_alarm { - border-color: #0091FF; + border: 3px solid #0091FF; } .minor_alarm:after { - content: "MINOR"; + content: "- MINOR -"; position: relative; float: right; color: #FF6F00; } .minor_alarm { - border-color: #FF6F00; - + border: 3px solid #FF6F00; } .major_alarm:after { - content: "MAJOR"; + content: "- MAJOR -"; position: relative; float: right; color: #FF0000; } .major_alarm { - border-color: #FF0000; + border: 3px solid #FF0000; +} + +.disconnected { + border: 3px solid #EBFF00; } -- 2.43.0