Hello Eduardo,
Here is a modification which contains the Paused and Acknowledge states. Of course, you can adapt the code as you need. However, we won't provide support for it.
Before applying the modification, please copy the file trafficlight.htm (under "C:\Program Files (x86)\PRTG Network Monitor\webroot\mapobjects") and change its name by modifying the first line:
<!--Status Icons: Traffic light 2-->
Then, here is the first part of the code which need to be modified to include the other states:
<#if value="@nodename" is="sensor" then="sensr" else="hasred" varexpand="value" var="containsred">
<#if value="@nodename" is="sensor" then="sensy" else="hasyellow hasnored" varexpand="value" var="containsyellow">
<#if value="@nodename" is="sensor" then="sensg" else="hasgreen hasnoyellow hasnored" varexpand="value" var="containsgreen">
<#if value="@nodename" is="sensor" then="sensb" else="hasblue hasnogreen hasnoyellow hasnored" varexpand="value" var="containsblue">
<#if value="@nodename" is="sensor" then="senso" else="hasorange hasnogreen hasnoyellow hasnored" varexpand="value" var="containsorange">
The height of the object must be increased as well:
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.0"
width="100%"
height="100%"
viewBox="0 0 100 460">
Finally, you need to add the corresponding circles:
<circle class="trafficlight_circle" r="40" fill="#DADADA" cx="50" cy="50" />
<circle class="trafficlight_circle" r="40" fill="#DADADA" cx="50" cy="140" />
<circle class="trafficlight_circle" r="40" fill="#DADADA" cx="50" cy="230" />
<circle class="trafficlight_circle" r="40" fill="#DADADA" cx="50" cy="320" />
<circle class="trafficlight_circle" r="40" fill="#DADADA" cx="50" cy="410" />
<circle style="<#if value="@status" contains="@containsred" then="" else="opacity:0" varexpand="value,contains">" r="40" fill="#E6005F" cx="50" cy="50" />
<circle style="<#if value="@status" contains="@containsyellow" then="" else="opacity:0" varexpand="value,contains">" r="40" fill="#F59C00" cx="50" cy="140" />
<circle style="<#if value="@status" contains="@containsgreen" then="" else="opacity:0" varexpand="value,contains">" r="40" fill="#C0CC19" cx="50" cy="230" />
<circle style="<#if value="@status" contains="@containsblue" then="" else="opacity:0" varexpand="value,contains">" r="40" fill="#03c8ff" cx="50" cy="320" />
<circle style="<#if value="@status" contains="@containsorange" then="" else="opacity:0" varexpand="value,contains">" r="40" fill="#fc4e65" cx="50" cy="410" />
Here is the result:
Regards.
Add comment