]> jspc29.x-matter.uni-frankfurt.de Git - mvd_epics.git/commitdiff
DASH: unicode units °C & g/m³
authorPhilipp Klaus <klaus@physik.uni-frankfurt.de>
Thu, 24 Aug 2017 13:37:07 +0000 (15:37 +0200)
committerPhilipp Klaus <klaus@physik.uni-frankfurt.de>
Thu, 24 Aug 2017 13:37:07 +0000 (15:37 +0200)
python_suite/dashboard/dashboard.py

index 318e5ea9409ed0e31bf1ef1a62840b4f39c6790f..92db225eeba11dd200cbf08263a383f29c1817d1 100755 (executable)
@@ -102,8 +102,8 @@ def cb_value_update(**kwargs):
             pv['classes'] += ' switch'
         if pv['value'] is None: pv['value'] = '- disconnected -'
         pv['unit'] = kwargs['units'] or ''
-        if pv['unit'] == 'deg C': pv['unit'] = '&degC'
-        if pv['unit'] == 'g/m3': pv['unit'] = 'g/m&sup3'
+        if pv['unit'] == 'deg C': pv['unit'] = '°C'
+        if pv['unit'] == 'g/m3': pv['unit'] = 'g/m³'
 
 @route('/')
 def index():