diff --git a/NON-APPROVED/COMMON/DEVICES/vacuum/COMMON/Faceplate/gauge_status.js b/NON-APPROVED/COMMON/DEVICES/vacuum/COMMON/Faceplate/gauge_status.js deleted file mode 100644 index 3703d4a1d78d9f5d8259c8f45d5b472c004c2f92..0000000000000000000000000000000000000000 --- a/NON-APPROVED/COMMON/DEVICES/vacuum/COMMON/Faceplate/gauge_status.js +++ /dev/null @@ -1,17 +0,0 @@ -PVUtil = org.csstudio.display.builder.runtime.script.PVUtil; - -var valid = pvs[0]; -var type = pvs[1]; -var chan = pvs[2]; - -if (PVUtil.getLong(valid)) -{ - widget.setPropertyValue("text", PVUtil.getString(chan)); - widget.setPropertyValue("transparent", "true"); -} -else -{ - widget.setPropertyValue("text", PVUtil.getString(type) + " @ " + PVUtil.getString(chan)); - widget.setPropertyValue("transparent", "false"); -} -widget.setPropertyValue("tooltip", "Gauge " + PVUtil.getString(type) + " @ channel " + PVUtil.getString(chan)); diff --git a/NON-APPROVED/COMMON/DEVICES/vacuum/COMMON/Faceplate/gauge_status.py b/NON-APPROVED/COMMON/DEVICES/vacuum/COMMON/Faceplate/gauge_status.py new file mode 100644 index 0000000000000000000000000000000000000000..ead0eb994be4bf30e2c797effb3fed35a53fad38 --- /dev/null +++ b/NON-APPROVED/COMMON/DEVICES/vacuum/COMMON/Faceplate/gauge_status.py @@ -0,0 +1,14 @@ +from org.csstudio.display.builder.runtime.script import PVUtil, ScriptUtil + +valid = pvs[0] +type = pvs[1] +chan = pvs[2] + +if PVUtil.getLong(valid): + widget.setPropertyValue("text", PVUtil.getString(chan)) + widget.setPropertyValue("transparent", "true") +else: + widget.setPropertyValue("text", PVUtil.getString(type) + " @ " + PVUtil.getString(chan)) + widget.setPropertyValue("transparent", "false") + +widget.setPropertyValue("tooltip", "Gauge " + PVUtil.getString(type) + " @ channel " + PVUtil.getString(chan)) diff --git a/NON-APPROVED/COMMON/DEVICES/vacuum/vgc/Faceplate/vac_mks-vgc-brief.bob b/NON-APPROVED/COMMON/DEVICES/vacuum/vgc/Faceplate/vac_mks-vgc-brief.bob index ed7bfa95d35b14e8284d32e30cc48e04807beead..fa189316c90ae62e1c8aadb904aba78beadf1e4d 100644 --- a/NON-APPROVED/COMMON/DEVICES/vacuum/vgc/Faceplate/vac_mks-vgc-brief.bob +++ b/NON-APPROVED/COMMON/DEVICES/vacuum/vgc/Faceplate/vac_mks-vgc-brief.bob @@ -61,7 +61,7 @@ <horizontal_alignment>2</horizontal_alignment> <vertical_alignment>1</vertical_alignment> <scripts> - <script file="../../COMMON/Faceplate/gauge_status.js"> + <script file="../../COMMON/Faceplate/gauge_status.py"> <pv_name>$(DEVICENAME):ValidR</pv_name> <pv_name>$(DEVICENAME):SensorTypeR</pv_name> <pv_name>$(DEVICENAME):ChanR</pv_name> diff --git a/NON-APPROVED/COMMON/DEVICES/vacuum/vgc/Faceplate/vac_mks-vgc.bob b/NON-APPROVED/COMMON/DEVICES/vacuum/vgc/Faceplate/vac_mks-vgc.bob index 9d880f4edd9b20344366229965512cdc927db713..2a3f57843a46d55d59c2502b9cce78d15956fc0d 100644 --- a/NON-APPROVED/COMMON/DEVICES/vacuum/vgc/Faceplate/vac_mks-vgc.bob +++ b/NON-APPROVED/COMMON/DEVICES/vacuum/vgc/Faceplate/vac_mks-vgc.bob @@ -39,7 +39,7 @@ <widget type="label" version="2.0.0"> <name>Status</name> <text>XX @ Yy</text> - <x>900</x> + <x>902</x> <y>5</y> <width>70</width> <height>25</height> @@ -56,10 +56,10 @@ </color> </background_color> <transparent>false</transparent> - <horizontal_alignment>1</horizontal_alignment> + <horizontal_alignment>2</horizontal_alignment> <vertical_alignment>1</vertical_alignment> <scripts> - <script file="../../COMMON/Faceplate/gauge_status.js"> + <script file="../../COMMON/Faceplate/gauge_status.py"> <pv_name>$(DEVICENAME):ValidR</pv_name> <pv_name>$(DEVICENAME):SensorTypeR</pv_name> <pv_name>$(DEVICENAME):ChanR</pv_name> @@ -119,10 +119,10 @@ </widget> <widget type="embedded" version="2.0.0"> <name>MKS Gauge Relay Control 1</name> - <file>../../COMMON/Faceplate/vac_gauge-mks-relay-control.bob</file> <macros> <RELAY>1</RELAY> </macros> + <file>../../COMMON/Faceplate/vac_gauge-mks-relay-control.bob</file> <x>90</x> <y>40</y> <width>206</width> @@ -150,10 +150,10 @@ </widget> <widget type="embedded" version="2.0.0"> <name>MKS Gauge Relay Control 2</name> - <file>../../COMMON/Faceplate/vac_gauge-mks-relay-control.bob</file> <macros> <RELAY>2</RELAY> </macros> + <file>../../COMMON/Faceplate/vac_gauge-mks-relay-control.bob</file> <x>308</x> <y>40</y> <width>206</width> @@ -181,10 +181,10 @@ </widget> <widget type="embedded" version="2.0.0"> <name>MKS Gauge Relay Control 3</name> - <file>../../COMMON/Faceplate/vac_gauge-mks-relay-control.bob</file> <macros> <RELAY>3</RELAY> </macros> + <file>../../COMMON/Faceplate/vac_gauge-mks-relay-control.bob</file> <x>526</x> <y>40</y> <width>206</width> @@ -212,10 +212,10 @@ </widget> <widget type="embedded" version="2.0.0"> <name>MKS Gauge Relay Control 4</name> - <file>../../COMMON/Faceplate/vac_gauge-mks-relay-control.bob</file> <macros> <RELAY>4</RELAY> </macros> + <file>../../COMMON/Faceplate/vac_gauge-mks-relay-control.bob</file> <x>744</x> <y>40</y> <width>206</width> diff --git a/NON-APPROVED/COMMON/DEVICES/vacuum/vgc/Faceplate/vac_tpg-vgc-brief.bob b/NON-APPROVED/COMMON/DEVICES/vacuum/vgc/Faceplate/vac_tpg-vgc-brief.bob index 5d132fe645d3c008cae3c8966a3552c9e5361fe0..372bac58fb74fa5eaa9ac6d97fef4d6574f90e80 100644 --- a/NON-APPROVED/COMMON/DEVICES/vacuum/vgc/Faceplate/vac_tpg-vgc-brief.bob +++ b/NON-APPROVED/COMMON/DEVICES/vacuum/vgc/Faceplate/vac_tpg-vgc-brief.bob @@ -68,7 +68,7 @@ <horizontal_alignment>2</horizontal_alignment> <vertical_alignment>1</vertical_alignment> <scripts> - <script file="../../COMMON/Faceplate/gauge_status.js"> + <script file="../../COMMON/Faceplate/gauge_status.py"> <pv_name>$(DEVICENAME):ValidR</pv_name> <pv_name>$(DEVICENAME):SensorTypeR</pv_name> <pv_name>$(DEVICENAME):ChanR</pv_name> diff --git a/NON-APPROVED/COMMON/DEVICES/vacuum/vgc/Faceplate/vac_tpg-vgc.bob b/NON-APPROVED/COMMON/DEVICES/vacuum/vgc/Faceplate/vac_tpg-vgc.bob index bc259e01c632309ebc9110461e365af10bace591..a32b3efe9cb42bf973fc592ca76173dc45990a05 100644 --- a/NON-APPROVED/COMMON/DEVICES/vacuum/vgc/Faceplate/vac_tpg-vgc.bob +++ b/NON-APPROVED/COMMON/DEVICES/vacuum/vgc/Faceplate/vac_tpg-vgc.bob @@ -68,7 +68,7 @@ <horizontal_alignment>2</horizontal_alignment> <vertical_alignment>1</vertical_alignment> <scripts> - <script file="../../COMMON/Faceplate/gauge_status.js"> + <script file="../../COMMON/Faceplate/gauge_status.py"> <pv_name>$(DEVICENAME):ValidR</pv_name> <pv_name>$(DEVICENAME):SensorTypeR</pv_name> <pv_name>$(DEVICENAME):ChanR</pv_name> diff --git a/NON-APPROVED/COMMON/DEVICES/vacuum/vgd/Faceplate/vac_mks-vgd-brief.bob b/NON-APPROVED/COMMON/DEVICES/vacuum/vgd/Faceplate/vac_mks-vgd-brief.bob index b8b050f30bc5f74f97e7575dd66744b89f84212b..b3c93ad1065a821ecfa080b6184d97255b4ff52f 100644 --- a/NON-APPROVED/COMMON/DEVICES/vacuum/vgd/Faceplate/vac_mks-vgd-brief.bob +++ b/NON-APPROVED/COMMON/DEVICES/vacuum/vgd/Faceplate/vac_mks-vgd-brief.bob @@ -61,7 +61,7 @@ <horizontal_alignment>2</horizontal_alignment> <vertical_alignment>1</vertical_alignment> <scripts> - <script file="../../COMMON/Faceplate/gauge_status.js"> + <script file="../../COMMON/Faceplate/gauge_status.py"> <pv_name>$(DEVICENAME):ValidR</pv_name> <pv_name>$(DEVICENAME):SensorTypeR</pv_name> <pv_name>$(DEVICENAME):ChanR</pv_name> diff --git a/NON-APPROVED/COMMON/DEVICES/vacuum/vgd/Faceplate/vac_mks-vgd.bob b/NON-APPROVED/COMMON/DEVICES/vacuum/vgd/Faceplate/vac_mks-vgd.bob index a9d0319794cef336ca96a0abc9dac09b6c0acb97..75faeb9f47485b32bf5fd5a9f35b923418ba1a5b 100644 --- a/NON-APPROVED/COMMON/DEVICES/vacuum/vgd/Faceplate/vac_mks-vgd.bob +++ b/NON-APPROVED/COMMON/DEVICES/vacuum/vgd/Faceplate/vac_mks-vgd.bob @@ -56,10 +56,10 @@ </color> </background_color> <transparent>false</transparent> - <horizontal_alignment>1</horizontal_alignment> + <horizontal_alignment>2</horizontal_alignment> <vertical_alignment>1</vertical_alignment> <scripts> - <script file="../../COMMON/Faceplate/gauge_status.js"> + <script file="../../COMMON/Faceplate/gauge_status.py"> <pv_name>$(DEVICENAME):ValidR</pv_name> <pv_name>$(DEVICENAME):SensorTypeR</pv_name> <pv_name>$(DEVICENAME):ChanR</pv_name> diff --git a/NON-APPROVED/COMMON/DEVICES/vacuum/vgp/Faceplate/vac_mks-vgp-brief.bob b/NON-APPROVED/COMMON/DEVICES/vacuum/vgp/Faceplate/vac_mks-vgp-brief.bob index a9b1b99bb95510261c22ac5ba57a7aab2d8b5f43..3a9d52f2e99515964976cfa4cdfe73f01870f12a 100644 --- a/NON-APPROVED/COMMON/DEVICES/vacuum/vgp/Faceplate/vac_mks-vgp-brief.bob +++ b/NON-APPROVED/COMMON/DEVICES/vacuum/vgp/Faceplate/vac_mks-vgp-brief.bob @@ -61,7 +61,7 @@ <horizontal_alignment>2</horizontal_alignment> <vertical_alignment>1</vertical_alignment> <scripts> - <script file="../../COMMON/Faceplate/gauge_status.js"> + <script file="../../COMMON/Faceplate/gauge_status.py"> <pv_name>$(DEVICENAME):ValidR</pv_name> <pv_name>$(DEVICENAME):SensorTypeR</pv_name> <pv_name>$(DEVICENAME):ChanR</pv_name> diff --git a/NON-APPROVED/COMMON/DEVICES/vacuum/vgp/Faceplate/vac_mks-vgp.bob b/NON-APPROVED/COMMON/DEVICES/vacuum/vgp/Faceplate/vac_mks-vgp.bob index 2318c4a52506a74d6dec61afc004c4357c87a006..63bb2a05d3324d2d2bc33070038a976ce106c527 100644 --- a/NON-APPROVED/COMMON/DEVICES/vacuum/vgp/Faceplate/vac_mks-vgp.bob +++ b/NON-APPROVED/COMMON/DEVICES/vacuum/vgp/Faceplate/vac_mks-vgp.bob @@ -56,10 +56,10 @@ </color> </background_color> <transparent>false</transparent> - <horizontal_alignment>1</horizontal_alignment> + <horizontal_alignment>2</horizontal_alignment> <vertical_alignment>1</vertical_alignment> <scripts> - <script file="../../COMMON/Faceplate/gauge_status.js"> + <script file="../../COMMON/Faceplate/gauge_status.py"> <pv_name>$(DEVICENAME):ValidR</pv_name> <pv_name>$(DEVICENAME):SensorTypeR</pv_name> <pv_name>$(DEVICENAME):ChanR</pv_name> diff --git a/NON-APPROVED/COMMON/DEVICES/vacuum/vvmc/Faceplate/vac_mks-vvmc-brief.bob b/NON-APPROVED/COMMON/DEVICES/vacuum/vvmc/Faceplate/vac_mks-vvmc-brief.bob index 716bdeade568dda958544c6d97eb8d21d98efb0a..005fe4568230fc15b3ebce992ba4b18208e9c8e0 100644 --- a/NON-APPROVED/COMMON/DEVICES/vacuum/vvmc/Faceplate/vac_mks-vvmc-brief.bob +++ b/NON-APPROVED/COMMON/DEVICES/vacuum/vvmc/Faceplate/vac_mks-vvmc-brief.bob @@ -37,15 +37,18 @@ </color> </background_color> <transparent>false</transparent> - <horizontal_alignment>1</horizontal_alignment> <vertical_alignment>1</vertical_alignment> </widget> - <widget type="textupdate" version="2.0.0"> - <name>Channel</name> - <pv_name>$(DEVICENAME):ChanR</pv_name> - <x>340</x> + <widget type="label" version="2.0.0"> + <name>Status</name> + <text>XX @ Yy</text> + <x>295</x> <y>5</y> - <width>25</width> + <width>70</width> + <font> + <font name="SMALL-MONO-BOLD" family="Source Code Pro" style="BOLD" size="14.0"> + </font> + </font> <foreground_color> <color name="WHITE" red="255" green="255" blue="255"> </color> @@ -54,17 +57,17 @@ <color name="ERROR" red="252" green="13" blue="27"> </color> </background_color> - <horizontal_alignment>1</horizontal_alignment> + <transparent>false</transparent> + <horizontal_alignment>2</horizontal_alignment> <vertical_alignment>1</vertical_alignment> - <rules> - <rule name="Validity" prop_id="transparent" out_exp="true"> - <exp bool_exp="true"> - <expression>pvInt0</expression> - </exp> + <scripts> + <script file="../../COMMON/Faceplate/gauge_status.py"> <pv_name>$(DEVICENAME):ValidR</pv_name> - </rule> - </rules> - <tooltip></tooltip> + <pv_name>$(DEVICENAME):SensorTypeR</pv_name> + <pv_name>$(DEVICENAME):ChanR</pv_name> + </script> + </scripts> + <tooltip>NA</tooltip> </widget> <widget type="label" version="2.0.0"> <name>Flow</name> diff --git a/NON-APPROVED/COMMON/DEVICES/vacuum/vvmc/Faceplate/vac_mks-vvmc.bob b/NON-APPROVED/COMMON/DEVICES/vacuum/vvmc/Faceplate/vac_mks-vvmc.bob index b5bae98bb2bf66afc21c69ec77eb9051061d2c70..429f5a81f724ed65bd8ad2e05a96a348b1356d2c 100644 --- a/NON-APPROVED/COMMON/DEVICES/vacuum/vvmc/Faceplate/vac_mks-vvmc.bob +++ b/NON-APPROVED/COMMON/DEVICES/vacuum/vvmc/Faceplate/vac_mks-vvmc.bob @@ -57,10 +57,10 @@ </color> </background_color> <transparent>false</transparent> - <horizontal_alignment>1</horizontal_alignment> + <horizontal_alignment>2</horizontal_alignment> <vertical_alignment>1</vertical_alignment> <scripts> - <script file="../../COMMON/Faceplate/gauge_status.js"> + <script file="../../COMMON/Faceplate/gauge_status.py"> <pv_name>$(DEVICENAME):ValidR</pv_name> <pv_name>$(DEVICENAME):SensorTypeR</pv_name> <pv_name>$(DEVICENAME):ChanR</pv_name>