Change Navigation

Now that your app has a dashboard, you can set your app to display it when users first load your app rather than displaying the default Search dashboard. To do this, we'll modify the navigation file.

  1. In a text editor, open $SPLUNK_HOME/etc/apps/your_app/default/data/ui/nav/default.xml.
  2. Add the following line at the end of the <nav> block, replacing the value of "name" with your dashboard's name:
  3. <view name='your_dashboard_name_no_caps_or_spaces' default='true'/>
  4. From line 2 of the file, remove:
  5. default='true'

Your default.xml file should now look like this:

If you refresh Splunk Web, you'll notice that the navigation has not changed because navigation changes require you to either restart Splunk Enterprise or force a refresh of the Splunk Web UI. To get your new navigation to show up, do one of the following.

Restart Splunk Enterprise:

  1. In Splunk Web, click Settings, then Server Controls, then Restart Splunk.
  2. When you log back in, navigate to your app. The navigation will be updated and your dashboard will be open by default.

Force a refresh of Splunk Web UI:

Do one of the following:

  • Navigate to http://localhost:8000/en-US/_bump, click Bump version to flush the client cache. If you make changes to client-side JavaScript, CSS, or static resources, this command forces those assets to be updated.
  • Navigate to http://localhost:8000/en-US/debug/refresh, click Refresh to refresh almost all Splunk Enterprise knowledge objects. To refresh only views, navigation, or saved searches, you could append ?entity=data/ui/views, ?entity=data/ui/nav, or ?entity=saved/searches to the end of the URL.
  • Note  In these URLs, "8000" refers to the default port. "en-US" refers to your language and region. You might need to adjust these values according to your own port and region.

    For more about caching, see About file precedence and caching.

When you reload the page, you should now see your new dashboard's name in the navigation bar. Whichever method you chose, your dashboard should now look like this:

To find out more about customizing your app's navigation, see Add navigation to a Splunk app.

See also