Dashboards & Visualizations

Is it possible to open a pop-up window from a drilldown?

Path Finder

Dear ALL,

Is it possible to display a "yes" or "no" pop-up window before performing a search from the dashboard drilldown?

To prevent operational mistakes, I would like to stop opening the search SPL if there is a problem.

Labels (1)
Tags (1)
0 Karma



Just understanding your case,  you want to get confirmation (using JS confirm OR Popup ) from user on drilldown whether search could perform OR not.. right?

If I'm right can you please share, in case of Yes, how you want to execute search on drilldown and what should be the behaviour if No?  And what panel you are using for drilldown.

Note: In both ways, you need to go through javascript extensions. 



0 Karma

Path Finder

Thanks for the reply.
I'll check the references you gave me.

I'm assuming I'll create a custom search command that deletes the files in the drill down.
To prevent operation errors, I would like to display "yes" or "no" before deleting the file.

The dashboard panel will display a list of files stored in the target directory.
Select a file and display the popup.
→ If "Yes", execute the custom search command to delete the file.
→ If "No", abort the execution.
We are looking into whether or not these things can be done.

Tags (1)
0 Karma



Can you please try this Simple XML Dashboard?


<dashboard script="a.js">
  <label>Delete File with Confirmation</label>
      <table id="tbl_files">
          <query>| makeresults count=10 | eval a=1 | accum a | eval file="/opt/myfiles/A"+a+"_file.txt"</query>
        <option name="drilldown">cell</option>



], function(_, mvc, SearchManager, $) {
    var tokens = mvc.Components.get("submitted");
    var tbl_files = mvc.Components.get('tbl_files');

    var fileDeleteSearch = new SearchManager({
        id: "fileDeleteSearch",
        earliest_time: "0",
        latest_time: "",
        preview: true,
        autostart: false,
        cache: false,
        search: '| makeresults count=1 | eval comment = "Execute Command for delete $file_name$ file."'
    }, { tokens: true, tokenNamespace: "submitted" });

    fileDeleteSearch.on("search:error", function(e) {
        console.log("Error", e);
        console.log("Error", tokens.get("file_name"));

    fileDeleteSearch.on("search:done", function() {
        var myResults = fileDeleteSearch.data("results"); // get the data from that search

        myResults.on("data", function() {
            resultArray = myResults.data().rows;
            alert("File Deleted");

    tbl_files.on("click", function(e) {
        var file_name = e.data['click.value2'];
        if (confirm('Are you sure you want to delete ' + file_name + ' file?')) {
            // Delete the file
            tokens.set("file_name", file_name);
            console.log('Delete ' + file_name);

        } else {
            alert("File Deletion Aborted");
            // Do nothing!
            console.log('File Deletion Aborted ' + file_name);


I hope this will help you.


▄︻̷̿┻̿═━一   😉

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

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...