Dashboards & Visualizations

Why does "Search is waiting for input" has a delay if using loadjob and JS?

nick405060
Motivator

Main search:

makeresults | append [| loadjob "$exchange$"] | eval trigger="$submit_trigger1$"

where the ad-hoc loadjob sets $exchange$ via

<done>
  <condition>
    <set token="exchange">$job.sid$</set>
  </condition>
</done>

However, the "search is waiting for input" message does not go away until $job.sid$ is populated. Changing <done> to <progress> does not fix the issue. Isn't this an inherent drawback to using loadjob as a replacement for post-processing with its many faults (unable to do multiple base searches, export button grayed out)? Are there any workarounds or fixes?

nick405060
Motivator

One workaround is to use <table depends="$exchange$"> to hide results until completion, and then make your own HTML message:

  <search>
    <query>
| makeresults | eval trigger="$submit_trigger1$" | eval message="Your search is running..." | table message
    </query>
    <progress>
      <set token="submitted_message">$result.message$</set>
    </progress>
  </search>
  <search>
    <query>
| makeresults | eval trigger="$exchange$" | eval message="Your search is complete." | table message
    </query>
    <progress>
      <set token="submitted_message">$result.message$</set>
    </progress>
  </search>  
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...