In my dashboard I have two ChartElements (el1 with search1 and el2 with search2).
I need to set token $hierarchy$ in search1 and use it in title of el2.
I was able to use token in the title and set it manually with setToken("hierarchy", "need to have $hiearchy$ here")
but I am not sure how to set token inside the search1.
For example, I need functionality similar to this (this example is not working) ... | eval $hierarchy$="new title"
which will make title of el2 equal to new title
Btw, I am using dashboard that was converted into HTML.
Finally found a solution.
HTML part:
<div class="panel-head">
<h3>$hierarchy$</h3>
</div>
JS part:
// right under var search1 = new PostProcessManager({ ... })
new SearchEventHandler({
managerid: 'search1',
event: 'done',
actions: [
{
'type': 'set',
'token': 'hierarchytop',
'value': '$result.hierarchy$'
}
]
}
Finally found a solution.
HTML part:
<div class="panel-head">
<h3>$hierarchy$</h3>
</div>
JS part:
// right under var search1 = new PostProcessManager({ ... })
new SearchEventHandler({
managerid: 'search1',
event: 'done',
actions: [
{
'type': 'set',
'token': 'hierarchytop',
'value': '$result.hierarchy$'
}
]
}