All Apps and Add-ons

Simple XML - Inpage drilldown with time

crt89
Communicator

Good day Splunkers,

I have successfully created a dashboard with Inpage Drilldowns using Splunk 6 Dashboard Examples. It uses a javascript and css file to drilldown on the same page.

In my dashboard I have a timerange-picker which populates the time variables in my first/master search panels. My panels are on charts (line). I have manage to successfully control its drilldowns passing my click values to the next panels which is also a chart (line). How ever I wasn't able to pass the time variables on click, it still uses the time which I have set to my timerange-picker.

I was thinking should I put another set of text inputs to hold the time variables on click, then use this on my drilldown search for my drilldown panels? Is there modifications to be made in the javascript file?

Here's my sample code in the javascript file which pass the click values.

// start submit click value on cpudrilldown1 view
cpumainView.on('click', function(e) {
    e.preventDefault();
    var newValue = e.data['click.name2'];

    // Submit the value for the host field
    unsubmittedTokens.set('form.host', newValue);
    submittedTokens.set(unsubmittedTokens.toJSON());
    urlTokens.saveOnlyWithPrefix('form\\.', unsubmittedTokens.toJSON(), {
        replaceState: false
    });

}); // end

I'm not familiar to what codes should I put, would you help me figure out what to do with this? It would be a great help.

Thanks,

-crt89

DavidHourani
Super Champion

so you mean that the primary search uses its own time-picker whereas the drill down uses the pages time-picker ? and you want them both to use the same one which is the one set for the line chart in question ?

0 Karma

Rocket66
Communicator

Just simple pass the token(values) for "earliest" and "latest" (you receive from e.data)

Simple put a "console.log(e.data)" within that function to see it and then put it into

unsubmittedTokens.set('form.earliest', e.data[earliest]);
unsubmittedTokens.set('form.latest', e.data[latest]);

Then submit the (unsubmitted) tokens ( is already done by

submittedTokens.set(unsubmittedTokens.toJSON());

) - that's it, I think!

Greetz, Robert

0 Karma

adityapavan18
Contributor

Any luck in getting this workable??

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 ...