Dashboards & Visualizations

Default search in navigation menu

cafissimo
Communicator

Hello, I have built an application that has this navigation menu (default.xml):

<nav> <view name="maps" default='true' /> <collection label="Saved Searches"> <saved source="unclassified" /> </collection> <view name="about" /> </nav>

Under my "Saved Searches" menu entry I have two searches (Search A, Search B). Is it possible to set one of these two searches as the default search to be loaded and run once the user enter into the application?

Thanks in advance and kind regards.

Luca Caldiero, Consoft Sistemi S.p.A.

1 Solution

sideview
SplunkTrust
SplunkTrust

I dont think there's a nice way using default.xml (although one dirty way would be to have a default view that just instantly redirected to maps?s=saved_search_name)

The way to do it by the book is to edit the default view such that that view kicks off the search you want.

eg: If your 'maps' view has a SearchBar and a TimeRangePicker module on it, you would just set the 'default' param on SearchBar and on TimeRangePicker to match your saved search. If you're familiar with the 'ui examples' app you should know what Im talking about.

NOTE: if the view was used by your users during a time when it did NOT have 'isSticky="false"' in the <view> tag, you wont be able to reliably preset the default timerange.

more on that issue: http://answers.splunk.com/questions/9741/timerangepicker-wont-hold-value-on-dashboard

View solution in original post

0 Karma

sideview
SplunkTrust
SplunkTrust

I dont think there's a nice way using default.xml (although one dirty way would be to have a default view that just instantly redirected to maps?s=saved_search_name)

The way to do it by the book is to edit the default view such that that view kicks off the search you want.

eg: If your 'maps' view has a SearchBar and a TimeRangePicker module on it, you would just set the 'default' param on SearchBar and on TimeRangePicker to match your saved search. If you're familiar with the 'ui examples' app you should know what Im talking about.

NOTE: if the view was used by your users during a time when it did NOT have 'isSticky="false"' in the <view> tag, you wont be able to reliably preset the default timerange.

more on that issue: http://answers.splunk.com/questions/9741/timerangepicker-wont-hold-value-on-dashboard

0 Karma

cafissimo
Communicator

Thank you for your answer.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...