The SavedSearch manager is a manager that encapsulates the dispatch of a saved report.
Name | Default value | Description |
id | Required. The unique ID for this control. | |
app | The current app | Sets the namespace (the app context) to run in. For example, let's say your app, MyApp, runs saved searches. By default, all searches are run in the context of your MyApp app. If you try to run a search that is private to the Search app, you'll get an error, so you need to change this "app" property to "search" to successfully run those searches. |
autostart | true | When true, the manager will automatically start a new job whenever any search properties change or when the page is loaded (the component-loader is called). If false, application code must call startSearch manually to start a search. |
cache | false | true: Always use the results from a preexisting search job when possible. false: Never use results from preexisting search jobs. scheduled: Reuse any previously-run scheduled jobs. n: The number of seconds indicating the maximum age a search job can be to use its results. Results from search jobs that are newer than n seconds will be used. |
cancelOnUnload | true | When true, cancels any running searches when navigating away from the page. |
dispatch.propertyname | true | Indicated whether to enable dispatch properties. The following properties are available:
earliest_time enable_lookups indexedRealtime latest_time lookups max_count max_time reduce_freq rt_backfill spawn_process status_buckets time_format ttl |
owner | The current owner | Sets the namespace (the owner context) to run in. |
searchname | Required. The name of the saved report. |
Name | Description |
cancel | Cancels the search job. |
data | Returns the results model ( events | preview | results | summary ). |
finalize | Finalizes the search job. |
pause | Pauses the search job. |
startSearch | Creates the search job. |
unpause | Resumes the search job. |
Name | Description |
search:cancelled | Fired when the search is cancelled. Changing the properties of the search starts a new one, which may cancel an old search. |
search:done | Fired when the search has finished. Note that this event is never fired for a real-time search. |
search:error | Fired when an error occurs, such as when the user does not provide a search query, the user does not provide a valid name of a saved search, or when a network failure occurs. |
search:failed | Fired when the search job fails. |
search:progress | Fired to indicate search progress. |
search:start | Fired when the search is successfully started. |
{% savedsearchmanager id="example-saved-report" searchname="Report - Top Pageview" cache=True preview=True app="search" %}
<script> var deps = [ "splunkjs/ready!", "splunkjs/mvc/savedsearchmanager" ]; require(deps, function(mvc) { var SavedSearchManager = require("splunkjs/mvc/savedsearchmanager"); // Create manager new SavedSearchManager({ id: "example-saved-report", searchname: "Report - Top Pageview", cache: true, preview: true, "dispatch.earliest_time": "-24h@h", "dispatch.latest_time": "now", app: "search" }); }); </script>