Hi Community,
I would like to show the status of an ESXI via pictures.
If I displayed the search on a table then the values are shown correctly.
Why do the different panels not display?
Please advice...
<panel>
<table>
<search>
<query>
index="vmware-inv" | spath type | search type=HostSystem | spath moid | search moid="host-9" AND changeSet.summary.overallStatus!=""
| stats latest(changeSet.summary.overallStatus) as ManagedEntityStatus by host
</query>
<done>
<condition match="$result.ManagedEntityStatus$ == green">
<set token="show_Green">true</set>
<unset token="show_Grey"></unset>
<unset token="show_Yellow"></unset>
<unset token="show_Red"></unset>
</condition>
<condition match="$result.ManagedEntityStatus$ == red">
<set token="show_Red">true</set>
<unset token="show_Grey"></unset>
<unset token="show_Yellow"></unset>
<unset token="show_Green"></unset>
</condition>
<condition match="$result.ManagedEntityStatus$ == yellow">
<set token="show_Yellow">true</set>
<unset token="show_Grey"></unset>
<unset token="show_Green"></unset>
<unset token="show_Red"></unset>
</condition>
<condition match="$result.ManagedEntityStatus$ == grey">
<set token="show_Grey">true</set>
<unset token="show_Green"></unset>
<unset token="show_Yellow"></unset>
<unset token="show_Red"></unset>
</condition>
</done>
</search>
</table>
</panel>
<panel depends="$show_Green$">
<html>
<img src="http://sr.photos3.fotosearch.com/bthumb/CSP/CSP993/k14957243.jpg"></img>
</html>
</panel>
<panel depends="$show_Red$">
<html>
<img src="https://photos.gograph.com/thumbs/CSP/CSP742/k17687405.jpg"></img>
</html>
</panel>
<panel depends="$show_Yellow$">
<html>
<img src="http://www.bodyandmind.co.za/kidz/crying-baby.jpg"></img>
</html>
</panel>
<panel depends="$show_Grey$">
<html>
<img src="http://www.lindon.us/sitebuildercontent/sitebuilderpictures/Unbekannt.jpg"></img>
</html>
</panel>
You are REALLY close on this one. In a condition match, you need to wrap string values like "green" in quotes. The caveat is that they need to be sanitized quotes since the statement is already in quotes. It should look something like this:
<condition match="$result.ManagedEntityStatus$ == "green"">
Otherwise it is looking for the ManagedEntityStatus field to match another field named green
@pduvofmr Try using quot in condition like this <condition match=" $result.ManagedEntityStatus$ == "green" ">
Be careful with the formatting on this one. While it is more readable, you are including the spaces in the expected value and the condition will not match because "green"
is not equal to " green "
.
Yes you are right, just edited. Also saw you already answered it :). Thanks
You are REALLY close on this one. In a condition match, you need to wrap string values like "green" in quotes. The caveat is that they need to be sanitized quotes since the statement is already in quotes. It should look something like this:
<condition match="$result.ManagedEntityStatus$ == "green"">
Otherwise it is looking for the ManagedEntityStatus field to match another field named green