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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...