Dashboards & Visualizations

How to hide dashboard panel results until search is complete.

iamsplunker31
Path Finder

Hello Splunk Community.
We have a dashboard with 8 panels. The dashboard has 2 text boxes where we can use to enter start date with time and end date with time & it also has a drop down to select the panel we want. I would like to hide the dashboard results until search is complete and then display the results. Now the issue is .. it is hiding the results when we first open a dashboard and enter the inputs (Start and end date)
but when we switch the panels it didn't work. It only works for the first time . Here is the code I'm using.

<panel rejects="$hide_progress_panel$">
          <html>
              <p align="center">Loading, please wait...</p>
   </html>
</panel>
                     </row>
               <row>
<panel depends="$Apple-details$,$hide_progress_panel$">



--

<finalized>
    <set token="hide_progress_panel">true</set>
</finalized>
0 Karma
1 Solution

niketn
Legend

@iamsplunker31 try the following code block to your existing search. When the search query runs the token should be unset using <progress> Search Event Handler and only when the search completes it should be set using <done> Search Event Handler.

PS: <finalized> search event handler has been deprecated since Splunk Enterprise 6.4.

 <progress>
     <unset token="hide_progress_panel"></unset>
 </progress>
 <done>
     <set token="hide_progress_panel">true</set>
 </done>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

woodcock
Esteemed Legend

Thank you for crediting the BEST answer by @niketnilay.

woodcock
Esteemed Legend

Try this:

  <html>
     <p align="center">Loading, please wait...</p>
  </html>
</panel>



  <progress>
     <unset token="hide_progress_panel"></unset>
  </progress>
  <done>
     <set token="hide_progress_panel">true</set>
  </done>
0 Karma

iamsplunker31
Path Finder

Thank you @woodcock.
It worked.

niketn
Legend

@woodcock small correction, closing node for <unset> should be </unset> not </set>

  <unset token="hide_progress_panel"></unset>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

woodcock
Esteemed Legend

Good point; I fixed it. And I see that you posted the same answer (without the typo) shortly before I did, so really, @iamsplunker31, you should UnAccept my answer and Accept the one from @niketnilay.

0 Karma

niketn
Legend

@iamsplunker31 try the following code block to your existing search. When the search query runs the token should be unset using <progress> Search Event Handler and only when the search completes it should be set using <done> Search Event Handler.

PS: <finalized> search event handler has been deprecated since Splunk Enterprise 6.4.

 <progress>
     <unset token="hide_progress_panel"></unset>
 </progress>
 <done>
     <set token="hide_progress_panel">true</set>
 </done>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

Maya
Loves-to-Learn Lots

I have a requirement to hide the results from a panel until search is not complete.  WHen I am using below, it is hiding the panel until result is not coming. 

 

Can you please suggest how can I see the pannel but, not the results until search is not complete. 

<panel depends="$hide_progress_panel$">
<table>
<search>

<query>index="_internal"
|table *</query>
<earliest>-30d@d</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
<progress>
<unset token="hide_progress_panel"></unset>
</progress>
<done>
<set token="hide_progress_panel">true</set>
</done>

0 Karma

iamsplunker31
Path Finder

Thank you @niketnilay. This resolves my issue

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...