User Tools

Site Tools


supported_hardware:ping

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
supported_hardware:ping [2021/03/05 15:08]
James Sentman created
supported_hardware:ping [2021/03/05 19:28] (current)
James Sentman [Displaying More Information:]
Line 127: Line 127:
 {{:​supported_hardware:​ping_label_display.png?​150 |}}It is possible to display more info in various Views or lists by editing the On and Off labels for the device. In this example I am displaying the status and also the Reliability percentage in this view and web interface widget. To do this edit the On and Off labels in the Ping Unit something like this: {{:​supported_hardware:​ping_label_display.png?​150 |}}It is possible to display more info in various Views or lists by editing the On and Off labels for the device. In this example I am displaying the status and also the Reliability percentage in this view and web interface widget. To do this edit the On and Off labels in the Ping Unit something like this:
  
-**On Label:** UP (<​property name=“Reliability”>​)\\ +**On Label:** UP (<​property name=“Reliability”>​%)\\ 
-**Off Label:** DOWN (<​property name=“Reliability”>​)+**Off Label:** DOWN (<​property name=“Reliability”>​%)
  
-You may also wish to setup custom colors for the unit in question so that the displays appear green when the unit is on and red when it is off which is the opposite of the default display colors. For the Red color I use “33FF33” and for the green color I use “FB0106”+You may also wish to setup custom colors for the unit in question so that the displays appear green when the unit is on and red when it is off which is the opposite of the default display colors. For the Red color I use “33FF33” and for the green color I use “FB0106” ​If you wish you can make the display be yellow if the value is anything less than 100%. In the screen shot of unit properties the Reliability is a text value with the % at the end. In the release version that has been changed to a number so that easier comparisons can be made. In order to make this work you need another block of code inside the on propertyChanged handler something like this: 
 + 
 +<​code>​ 
 +on propertyChanged( theName, theValue) 
 +   if theName = “Reliability” then 
 +     if theValue = 100 then 
 +       set xtOnColor of xUnit (thisUnit) to “33FF33"​ 
 +     ​else 
 +       set xtOnColor of xUnit (thisUnit) to “FFFF33"​ 
 +     end if 
 +   end if 
 +end propertyChanged 
 +</​code>​
  
 All of these values can be set on the Display tab of the Edit Unit Dialog. The [[xtension_manual:​advancedlabel|Advanced Label Syntax]] is detailed on that page. Many values can be pulled into the display. All of these values can be set on the Display tab of the Edit Unit Dialog. The [[xtension_manual:​advancedlabel|Advanced Label Syntax]] is detailed on that page. Many values can be pulled into the display.
supported_hardware/ping.1614956887.txt.gz · Last modified: 2021/03/05 15:08 by James Sentman