]> jspc29.x-matter.uni-frankfurt.de Git - mvd_epics.git/commitdiff
DASH: fix 'float' not iterable error (complements 29fd3c2)
authorPhilipp Klaus <klaus@physik.uni-frankfurt.de>
Wed, 11 Oct 2017 12:16:55 +0000 (14:16 +0200)
committerPhilipp Klaus <klaus@physik.uni-frankfurt.de>
Wed, 11 Oct 2017 12:16:59 +0000 (14:16 +0200)
python_suite/dashboard/views/pv_details_bootstrap.jinja2
python_suite/dashboard/views/pv_overview.jinja2
python_suite/dashboard/views/pv_overview_bootstrap.jinja2

index beb90be4b9e4686b5342e3e79ccfb7d614044698..2f29ef3084769b948619427501a367adfce84158 100644 (file)
@@ -31,7 +31,7 @@
                Current Value: <span class="value">
                {% if 'switch' in PV.classes %}
                        <label class="toggle">
-                               <input type="checkbox" disabled readonly {{ 'checked' if 'ON' in PV.value else '' }}>
+                               <input type="checkbox" disabled readonly {{ 'checked' if PV.value in (1, 'ON') else '' }}>
                                <span data-unchecked="OFF" data-checked="ON"></span>
                        </label>
                {% else %}
index 185436c3b1e0ffab765f409569069fe73a4fdcde..d43a86372d052d3b6da67f2cd47433d659152067 100644 (file)
@@ -36,7 +36,7 @@
                                                                <span class="value">
                                                                {% if 'switch' in PV.classes %}
                                                                        <label class="toggle">
-                                                                               <input type="checkbox" disabled readonly {{ 'checked' if 'ON' in PV.value else '' }}>
+                                                                               <input type="checkbox" disabled readonly {{ 'checked' if PV.value in (1, 'ON') else '' }}>
                                                                                <span data-unchecked="OFF" data-checked="ON"></span>
                                                                        </label>
                                                                {% else %}
index df052d9ed1c3051eaff8ac54eef1feb692c58e67..3ab57a6c583524b14ee165cfd30ba47610b1a998 100644 (file)
@@ -35,7 +35,7 @@
                                                        <span class="value">
                                                        {% if 'switch' in PV.classes %}
                                                                <label class="toggle">
-                                                                       <input type="checkbox" disabled readonly {{ 'checked' if 'ON' in PV.char_value else '' }}>
+                                                                       <input type="checkbox" disabled readonly {{ 'checked' if PV.value in (1, 'ON') else '' }}>
                                                                        <span data-unchecked="OFF" data-checked="ON"></span>
                                                                </label>
                                                        {% else %}