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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...