Dashboards & Visualizations

Use SplunkJS to link a table to another dashboard when on-click

MikeJu25
Path Finder

Hi, I'm trying to add something in between to link to another dashboard within the same app when user clicks the table. Could someone help with the syntax here? Thank you in advance!

 

myplaintable.on("click", function(e) {
        // Bypass the default behavior
        e.preventDefault();
     
        // add the linkage
        
        // Displays a data object in the console
        console.log("Clicked the table:", e.data);
    });

 

 

Labels (1)
0 Karma
1 Solution

kamlesh_vaghela
SplunkTrust
SplunkTrust

@MikeJu25 

Can you please try this?

var utils = require("splunkjs/mvc/utils");
myplaintable.on("click", function(e) {
    // Bypass the default behavior
    e.preventDefault(); 
    // add the linkage
    utils.redirect("app/search/mydashboard","_blank"); 
    // Displays a data object in the console
    console.log("Clicked the table:", e.data);
});

 

Thanks
KV
▄︻̷̿┻̿═━一

If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.

View solution in original post

kamlesh_vaghela
SplunkTrust
SplunkTrust

@MikeJu25 

Can you please try this?

var utils = require("splunkjs/mvc/utils");
myplaintable.on("click", function(e) {
    // Bypass the default behavior
    e.preventDefault(); 
    // add the linkage
    utils.redirect("app/search/mydashboard","_blank"); 
    // Displays a data object in the console
    console.log("Clicked the table:", e.data);
});

 

Thanks
KV
▄︻̷̿┻̿═━一

If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.

MikeJu25
Path Finder

Thank you so much!

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Why aren't you using the standard drilldown capability?

0 Karma

MikeJu25
Path Finder

The XML thing? Yea I can also do that but I want to know if the event handler in SplunkJS can actually link to a dashboard. 

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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