Dashboards & Visualizations

How to hide a panel on click of submit button?

Taruchit
Contributor

Hi All,

I have a dashboard initially loads with a hidden panel. A drilldown click in table on different panel shows the hidden panel. But, I want the panel to be hidden each time user clicks on submit button on the top and the hidden panel should only be displayed when user clicks on the event for drilldown. Currently, the hidden panel stays visible with old data when user fills input panel fields with different data and press the submit button.

Thus, I need your help to resolve the issue by handing it in dashboard's XML.

Thank you

Labels (3)
0 Karma
1 Solution

bowesmana
SplunkTrust
SplunkTrust

At least 3 ways to do this.

1. Add  a <change> section into the input where the user can type their input. This will mean that as soon as they change the input the dependent panel will disappear - before they press the submit button

<change>
  <unset token="your_drilldown_token"></unset>
</change>

 2. Add a <done> or <progress> section to the end of the primary panel <search> block, so that when it is running or is complete, it will remove the dependent panel

<progress>
  <unset token="your_drilldown_token"></unset>
</progress>

 3. Use a custom button and token tool to clear the token when the button is clicked.  See the Splunk Dashboard Examples app, Custom Token Links, where it uses a button to set/clear tokens, rather than using the submit button. This is a little more complicated in that it will behave differently to the submit button.

If you have several input fields and want the panel to go when the search starts, the <progress> option will probably work best.

I am not sure how to detect the clicking of the submit button in terms of any Splunk events.

The <done>/<progress> descriptions can be found here

https://docs.splunk.com/Documentation/SplunkCloud/8.2.2203/Viz/tokens#Search_event_elements_and_job_...

Hope this helps.

 

 

View solution in original post

bowesmana
SplunkTrust
SplunkTrust

At least 3 ways to do this.

1. Add  a <change> section into the input where the user can type their input. This will mean that as soon as they change the input the dependent panel will disappear - before they press the submit button

<change>
  <unset token="your_drilldown_token"></unset>
</change>

 2. Add a <done> or <progress> section to the end of the primary panel <search> block, so that when it is running or is complete, it will remove the dependent panel

<progress>
  <unset token="your_drilldown_token"></unset>
</progress>

 3. Use a custom button and token tool to clear the token when the button is clicked.  See the Splunk Dashboard Examples app, Custom Token Links, where it uses a button to set/clear tokens, rather than using the submit button. This is a little more complicated in that it will behave differently to the submit button.

If you have several input fields and want the panel to go when the search starts, the <progress> option will probably work best.

I am not sure how to detect the clicking of the submit button in terms of any Splunk events.

The <done>/<progress> descriptions can be found here

https://docs.splunk.com/Documentation/SplunkCloud/8.2.2203/Viz/tokens#Search_event_elements_and_job_...

Hope this helps.

 

 

Taruchit
Contributor

Thank you @bowesmana for your help.

0 Karma
Get Updates on the Splunk Community!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...