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!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...