Dashboards & Visualizations

How to hide a panel on click of submit button?

Taruchit
Communicator

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
Communicator

Thank you @bowesmana for your help.

0 Karma
Get Updates on the Splunk Community!

The Splunk Success Framework: Your Guide to Successful Splunk Implementations

Splunk Lantern is a customer success center that provides advice from Splunk experts on valuable data ...

Splunk Training for All: Meet Aspiring Cybersecurity Analyst, Marc Alicea

Splunk Education believes in the value of training and certification in today’s rapidly-changing data-driven ...

Investigate Security and Threat Detection with VirusTotal and Splunk Integration

As security threats and their complexities surge, security analysts deal with increased challenges and ...