I have a condition where i should display token value in title. If value is *, nothing needs to be displayed. Anything else then that value needs to be displayed from drop down.
<set token="my_test">$IG_tok$</set> </condition> <condition match="'IG_tok'=="*""> <set token="my_test"> </set> </condition> </change>`
I tried the above. but here if IG_tok is any value other than * - it takes previous value of IG_tok and not current one that we select,
I also tried this
<eval token="my_test">if($IG_tok$="*"," ",$IG_tok$)</eval>
DId not work. Takes previous value here as well. how to do this? please help in resolving this issue
Title should be displayed with ig_tok value. There are around 10 unique values. By default we have * .. when All is selected,(' *') would appear in title. Requirement is - Star alone should not be displayed. Anything else should be displayed. I tried with 2 panels to see if i can remove star from title. It dint work.
Basically the ask is this - if we have * then in title it should not display anything and if the token has any other value other than * it should display the value. Please find the code here
<panel depends="$show_panel$"> <html> <div class="left_logo"> <div class="right_logo"> <h2 align="center"> <b> A&PD Dashboard $my_test$ </b> </h2> </div> </div> </html> </panel> <panel rejects="$show_panel$"> <html> <div class="left_logo"> <div class="right_logo"> <h2 align="center"> <b> A&PD Dashboard $IG_tok$ </b> </h2> </div> </div> </html> </panel> <panel> <input type="dropdown" token="IG_tok" searchWhenChanged="true"> <label>IG</label> <choice value="*">All</choice> <default>*</default> <fieldForLabel>IG</fieldForLabel> <fieldForValue>IG</fieldForValue> <search> <query>index=aof_* |dedup IG|table IG</query> </search> <change> <condition match="'IG_tok'=="*""> <set token="my_test"> </set> <set token="show_panel">true</set> </condition> <condition match="'IG_tok'!="*""> <unset token="show_panel">false</unset> </condition> </change> </input> </panel> `
Please help. This looks simple. but I spent good amount of time here. unable to resolve. Any help is highly appreciated
@k_harini, as per your code, since you are keeping separate panels for whether All is selected in Dropdown or not.
Since the Panel to be displayed for All condition will only be displayed when All (
* ) is selected from dropdown, why do you need to use token to display panel title? You can just have Static title.
Only if there was only one panel with Panel Title to be changed when All is selected or when anything else is selected, would have made more sense. If I have misunderstood your use case or your code, please explain the same.