All Apps and Add-ons

Linking to flashtimeline with sid from a sideview HTML Module

chris
Motivator

When I try to redirect to the flashtimeline using the sid in an HTML Module:

<module name="HTML">
    <param name="html"><![CDATA[
        <a href=flashtimeline?sid=$results.sid$> View Results</a>
    ]]></param>
</module>

I get errors like theese:

The job appears to have expired or has been canceled. Splunk could not retrieve data for this search.

[SimpleResultsTable module] [HTTP 404] https://127.0.0.1:8089/services/search/jobs/1367928740.698/results?count=10&time_format=%25s.%25Q&ou...; [{'code': None, 'text': 'Unknown sid.', 'type': 'FATAL'}]

The job is created in the filesystem and there is no time issue as described in the flashtimeline view:

http://splunk-base.splunk.com/answers/22969/getting-an-error-banner-http-404-textunknown-sidcode-non...

I can even view the job in https://:8089/services/search/jobs/ as long as I do not click on the link.

As soon as I click on the link something seems to break.

1 Solution

chris
Motivator

The problem was that I had set onunloadCancelJobs="true" in the first line of the view xml:

<view isSticky="False" isVisible="true" onunloadCancelJobs="true" template="dashboard.html">

Setting the value to false fixed/works around the problem

The issue only occurs when using Firefox as the Browser as described in /share/splunk/search_mrsparkle/exposed/js/init.js:

// currently this only works on firefox.

// It could be made to work on IE if we removed SplunkPatchWindowUnload or reworked it somehow.
// and I cannot find a way to get this working on safari.
$(window).unload(function() {
if(Splunk.Globals.Jobber && Splunk.util.normalizeBoolean($(document.body).attr("s:onunloadcanceljobs") || false)){
Splunk.Globals.Jobber.listJobs(function(job){
return (job.canBeAutoCancelled());
}).cancel();

}
$(document).unbind();
$(this).unbind();

});

View solution in original post

chris
Motivator

The problem was that I had set onunloadCancelJobs="true" in the first line of the view xml:

<view isSticky="False" isVisible="true" onunloadCancelJobs="true" template="dashboard.html">

Setting the value to false fixed/works around the problem

The issue only occurs when using Firefox as the Browser as described in /share/splunk/search_mrsparkle/exposed/js/init.js:

// currently this only works on firefox.

// It could be made to work on IE if we removed SplunkPatchWindowUnload or reworked it somehow.
// and I cannot find a way to get this working on safari.
$(window).unload(function() {
if(Splunk.Globals.Jobber && Splunk.util.normalizeBoolean($(document.body).attr("s:onunloadcanceljobs") || false)){
Splunk.Globals.Jobber.listJobs(function(job){
return (job.canBeAutoCancelled());
}).cancel();

}
$(document).unbind();
$(this).unbind();

});

chris
Motivator

Hi Nick, it's not just the comment (at least not on my Computer). It took me a while to find out that the problem is browser specific because I randomly switch between Browsers when creating views so I run into (visual) problems quickly.

0 Karma

sideview
SplunkTrust
SplunkTrust

As it's most likely author, I would not necessarily take that comment at face value. I think the comment dates from a very long time ago and may very well not have been updated as frequently as the code itself. Although it is interesting that you're reporting that the onUnloadCancelJobs feature does indeed only work on Firefox. I'll check that out. If that's still happening it really should be addressed because it'll reduce concurrent load a lot for users predominantly using IE/safari.

0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...