Hi
i'm using a drop down option in which i have a static option ALL and value =* the drop down optin is for different environment ALL ,DEV,QA,PROD and i have a table where hosts are populated based on environment
the issues is in the title of the panel when i select ALL the title of the panel shows * hosts per environment for other DEV QA and PROD its working fine
How can i replace the * with ALL in the title of the panel
Hi
I tried using the change and condition option i created another token pan1 but how should i use it in the title panel as $env$ token is being used in both title and search query and i can't unset env token
<input type="dropdown" token="env" searchWhenChanged="true">
<label>ENV</label>
<fieldForLabel>ENV</fieldForLabel>
<fieldForValue>ENV</fieldForValue>
<search>
<query>index=testdata" |eval ENV=case(host LIKE "%tvap%","TEST",host LIKE "%qqap%","QA",host LIKE "%ppap%","PROD",host LIKE "%ccap%","CAT")|stats count by ENV</query>
<earliest>-4h@m</earliest>
<latest>now</latest>
</search>
<default>*</default>
<initialValue>*</initialValue>
<choice value="*">ALL</choice>
<change>
<condition value="*">
<set token="pan1">ALL</set>
</condition>
</change>
</input>
and the title panel
<panel >
<table>
<title>$pan1$ $env$ Environment PATCH STATUS </title>
<search>
When I said to use a different token in the title, I meant to use it instead of the current one. If the selection is not "*" then set pan1 to env.
<change>
<condition value="*">
<set token="pan1">ALL</set>
</condition>
<condition value="TEST">
<set token="pan1">TEST</set>
</condition>
<condition value="QA">
<set token="pan1">QA</set>
</condition>
<condition value="PROD">
<set token="pan1">PROD</set>
</condition>
<condition value="CAT">
<set token="pan1">CAT</set>
</condition>
</change>
I don't know of a way to do an "else" clause with <condition>.
Use a different token in the title of the panel. Use a <condition> statement to set the new token to "ALL" if the input token is "*".
Use the change event handler on the dropdown to set an additional token with ALL if * has been selected.