Dashboards & Visualizations

Default search in navigation menu

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

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

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

Communicator

Thank you for your answer.

0 Karma