Hi, I wonder whether someone may be able to help me please.
I'm trying to implement functionality on one of my dashboard panels which allows the user to select the 'refresh'. I ran a search and found a post here and so implemented the code as below:
<panel>
<input type="dropdown" token="refresh_interval" searchWhenChanged="true">
<label>Panel Refresh Override</label>
<choice value="60">1 Minute</choice>
<choice value="180">3 Minutes</choice>
<choice value="300">5 Minutes</choice>
<default>300</default>
</input>
<table>
<title>Partially Completed Submissions With Expiry Date of......</title>
<search>
<query>index=main auditSource=for-frontend auditType=FormSaved | rename generatedAt As "submissiondate" | eval submissiondate=strptime(submissiondate, "%Y-%m-%dT%H:%M:%S")|convert timeformat="%d/%b/%Y" ctime(submissiondate) | eval testtime=relative_time(now(), "-1d@d" ) | eval c_time=strftime(testtime,"%d/%b/%Y") | where c_time=submissiondate | head 1 | search NOT[search index=main auditSource=for-frontend auditType=FormSubmission | table detail.referenceNumber] | rename detail.referenceNumber As "refno" | rename detail.name As "fullname" | rename detail.90DayExpirationDate As "expirydate" | eval expirydate=strptime(expirydate, "%Y-%m-%dT%H:%M:%S")|convert timeformat="%d/%b/%Y" ctime(expirydate) | eval Full_Details= "Ref No: ".refno.", Fullname: ".fullname.", Date of submission: ".submissiondate.", Expiry Date: ".expirydate | makemv delim=", " Full_Details | table Full_Details</query>
<earliest>0</earliest>
<latest></latest>
</search>
<option name="wrap">true</option>
<option name="rowNumbers">false</option>
<option name="drilldown">cell</option>
<option name="dataOverlayMode">none</option>
<option name="count">10</option>
<option name="refresh.auto.interval">$refresh_interval$</option>
</table>
</panel>
The problem is, no matter the selection made on the drop-down menu, the panel does not refresh.
I just wonder whether someone could look at this please and let me know where I've gone wrong.
Many thanks and kind regards
Chris
I don't think you are doing anything syntactically wrong, except that tokens don't appear to be supported in options XML elements, as it appears.
While our documentation doesn't explicitly state that, it also doesn't have any examples for that usage.
You will have noticed that your panel also didn't refresh when you select a value. Try adding | eval foo=$refresh_interval$ to your search string for that panel and notice how the panel reloads every time you pick another value. But your refresh interval will still use the default value.
If you need your users to be able to manually refresh panels, then just train them how to use the built-in
capability for this. In the lower-left corner of each pane should be 4 icons: Magnifying Glass
, Down Arrow
, Italic "i"
, and Circular Arrow
. Whenever the last one is clicked, the panel is refreshed.
Hi @woodcock, many thanks for your help and for the advice.
Kind Regards
Chris
You meant "the last one"... 😉
Yes, and now fixed.
I don't think you are doing anything syntactically wrong, except that tokens don't appear to be supported in options XML elements, as it appears.
While our documentation doesn't explicitly state that, it also doesn't have any examples for that usage.
You will have noticed that your panel also didn't refresh when you select a value. Try adding | eval foo=$refresh_interval$ to your search string for that panel and notice how the panel reloads every time you pick another value. But your refresh interval will still use the default value.
Hi @ssievert, many thanks for your help and guidance.
Kind Regards
Chris
Is there any workaround to get the panels to refresh based off a token value?