The ResultsLink view displays a panel with buttons to open the search, export results, open the search job inspector, and refresh the page. This panel is the same as one that is included with the wrapper for converted visualizations, allowing you to use these controls with a search directly.
Name | Default value | Description |
id | Required. The unique ID for this control. | |
link.exportResults.visible | Indicates whether to show the Export button in the panel. | |
link.inspectSearch.visible | Indicates whether to show the Inspect button in the panel. | |
link.openSearch.search | The alternative search query to use for the Open in Search button. | |
link.openSearch.searchEarliestTime | The earliest time to use for the alternative search specified by link.openSearch.search. | |
link.openSearch.searchLatestTime | The latest time to use for the alternative search specified by link.openSearch.search. | |
link.openSearch.text | "Open in Search" | The label to use for the Open in Search button. |
link.openSearch.ViewTarget | "Search" | The name of the target view for the Open in Search button. |
link.openSearch.visible | Indicates whether to show the Open in Search button in the panel. | |
link.visible | true | Indicates whether to show link buttons in the panel. |
managerid | null | The ID of the search manager to bind this view to. |
require([ "jquery", "splunkjs/mvc/searchmanager", "splunkjs/mvc/resultslinkview", "splunkjs/mvc/simplexml/ready!" ], function( $, SearchManager, ResultsLinkView ) { // Instantiate the search manager var mysearch = new SearchManager({ id: "mysearch", search: "index=_internal | head 1000 | top 3 sourcetype" }); // Instantiate the results link view var resultsLink = new ResultsLinkView({ id: "resultsLink", managerid: "mysearch", "link.exportResults.visible": false, el: $("#controlpanel") }); // Display the results link view resultsLink.render().$el.appendTo($("controlpanel")); });