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!

Splunk Observability Cloud | Unified Identity - Now Available for Existing Splunk ...

Raise your hand if you’ve already forgotten your username or password when logging into an account. (We can’t ...

Index This | How many sides does a circle have?

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

Registration for Splunk University is Now Open!

Are you ready for an adventure in learning?   Brace yourselves because Splunk University is back, and it's ...