Splunk Dev

trying to add export/inspect/open in search options, resultsLinkView

pmeyerson
Path Finder

I have a dashboard using a custom splunk web framework view which displays some stuff and a tableview of search results.  This works great.

I am trying to add the "ResultsLinkView" so that users can export these search results and am running into issues.


The docs reference a "controlpanel" element the ResultsLinkView should be tied to, but I'm not sure how to translate that reference into what I have to work with in my code.  I dont understand how to tie together the ResultsLinkView to a TableView... or is this the wrong approach?

With the below, I see the table view results, and the links for the ResultsLinkView are present but disabled, even if I mouse over.

<form script="test.js">
  <label>Report</label>
  <row>
    <panel>
        <html>
            <h3>TEST</h3>
            <div id="dummy_table"></div>
            <div id="dummy_resultslink"></div>
        </html>
    </panel>
  </row>
</form>

 

require([
    "jquery",
    "splunkjs/mvc",
    "splunkjs/mvc/searchmanager",
    "splunkjs/mvc/tableview",
    "splunkjs/mvc/resultslinkview",    
    "splunkjs/mvc/simplexml/ready!"
  ], function(
      $,
      mvc,
      SearchManager,
      TableView,
      ResultsLinkView
  ) {
    var dummysearch = new SearchManager({
          id: "dummysearch",
          search: mvc.tokenSafe('|makeresults |eval stuff="dummy"'),
          autostart: "false",
          preview: false,
          cache: true
    });
 
    tvdummy= new TableView({
          id: "dummytable",
          el: $("#dummy_table"),
          managerid: "dummysearch"
    }).render();

    var resultsLink = new ResultsLinkView({
        id: "resultsLink",
        managerid: "dummytable",
        el: $("#dummy_resultslink")
    });
    resultsLink.render().$el.appendTo($("dummy_resultslink")); 
 });

 

if i change 

    var resultsLink = new ResultsLinkView({
        ...
        el: $("#dummy_table")
    });
    resultsLink.render().$el.appendTo($("dummy_table")); 
 });

then I don't see any search results.

Appreciate any suggestions, TIA

Labels (2)
0 Karma
Get Updates on the Splunk Community!

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...

Splunk App Dev Community Updates – What’s New and What’s Next

Welcome to your go-to roundup of everything happening in the Splunk App Dev Community! Whether you're building ...

The Latest Cisco Integrations With Splunk Platform!

Join us for an exciting tech talk where we’ll explore the latest integrations in Cisco &#43; Splunk! We’ve ...