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!

Say goodbye to manually analyzing phishing and malware threats with Splunk Attack ...

In today’s evolving threat landscape, we understand you’re constantly bombarded with phishing and malware ...

AppDynamics is now part of Splunk Ideas

Hello Splunkers, We have exciting news for you! AppDynamics has been added to the Splunk Ideas Portal. Which ...

Advanced Splunk Data Management Strategies

Join us on Wednesday, May 14, 2025, at 11 AM PDT / 2 PM EDT for an exclusive Tech Talk that delves into ...