Dashboards & Visualizations

Multi-Level nav menu won't open

Jason
Motivator

So, to test multi-level saved searches nav for a client, I built a splunk app with a lot of test saved searches in it. They're named Test Search 1 through Test Search 35.

I built this, which when put down at the bottom of the default nav xml puts all the Test Searches into their own folder.

It also tries to segregate out all the Test Search 1* searches and put them in their own subfolder. Which it does (they don't appear in the Test Searches menu anymore) but.. the With a 1 menu won't open. In any of my three browsers.

<collection label="Test Searches">
    <collection label="With a 1">
      <saved source="unclassified" match="Test Search 1" />
    </collection>
  <saved source="unclassified" match="Test Search" />
</collection>
<saved source="unclassified" />

Why won't the With a 1 open? It shows up, and gets searches, but won't open whether or not I just mouse over it, or click on it.

Splunk 4.1.3, Firefox 3.5.6/Opera 10.10/IE 8.0

Tags (3)
1 Solution

hexx
Splunk Employee
Splunk Employee

UPDATE: The maximum nav menu nesting depth of 2 has been lifted as of Splunk 4.3.

The instructions below only apply to versions of Splunk anterior to 4.3.

Currently, Splunk only provides 2 levels of nesting in the nav menu. This is why collections defined beyond a depth level of 2 will not display properly. This has been filed as a bug (SPL-29475) and in all likelihood deeper levels of nesting will be supported in a future release.

In the meantime, the work-around is to define collections that require 2 levels of depth from the top-level.

Here is a $SPLUNK_HOME/etc/apps/search/default/data/ui/nav/default.xml that defines a new "Saved Searches Test" top level nav bar item for saved searches matching "Test Search", with sub-groups for "Test Search 1", "Test Search 2" and "Test Search 3".

<nav>
  <view name="dashboard" default='true' />
  <view name="flashtimeline" />
  <collection label="Status">
    <collection label="Search activity">
      <view name="search_status" />
      <view name="search_detail_activity" />
      <view name="search_user_activity" />
      <view name="search_ui_activity" />
    </collection>
    <collection label="Index activity">
      <view name="index_status" />
      <view name="index_status_health" />
      <view name="indexing_volume" />
    </collection>
    <collection label="Server activity">
      <view name="splunkd_status" />
      <view name="splunkweb_status" />
    </collection>
    <view name="inputs_status" />
    <collection label="Scheduler activity">
      <view name="scheduler_status" />
      <view name="scheduler_user_app" />
      <view name="scheduler_savedsearch" />
      <view name="scheduler_status_errors" />
      <view name="pdf_activity" />
    </collection>
  </collection>
  <collection label="Views">
    <view name="charting" />
    <divider />
    <view source="unclassified" />
    <divider />
    <a href="https://answers.splunk.commanager/search/data/ui/views">Manage Views</a>        
  </collection>
  <collection label="Saved Searches Test">
   <collection label="With a 1">
    <saved source="unclassified" match="Test Search 1" />
   </collection>
   <collection label="With a 2">
    <saved source="unclassified" match="Test Search 2" />
   </collection>
   <collection label="With a 3">
    <saved source="unclassified" match="Test Search 3" />
   </collection>
   <saved source="unclassified" match="Test Search" />
  </collection>
  <collection label="Searches &amp; Reports">
    <collection label="Errors">
      <saved source="unclassified" match="error" />
    </collection>
    <collection label="Admin">
      <saved source="unclassified" match="Admin" />
    </collection>
    <collection label="Inputs">
      <saved source="unclassified" match="Inputs" />
    </collection>
    <saved source="unclassified" />
    <divider />
    <a href="https://answers.splunk.commanager/search/saved/searches">Manage Searches &amp; Reports</a>        
  </collection>
</nav>

View solution in original post

richnavis
Contributor

I tried this out and although I was able to create a menu two levels deep, none of my menu items were displayed...

eg:

LEVEL 1 Menu
LEVEL 2 Menu
Menu item (This item is not displayed)

0 Karma

hexx
Splunk Employee
Splunk Employee

UPDATE: The maximum nav menu nesting depth of 2 has been lifted as of Splunk 4.3.

The instructions below only apply to versions of Splunk anterior to 4.3.

Currently, Splunk only provides 2 levels of nesting in the nav menu. This is why collections defined beyond a depth level of 2 will not display properly. This has been filed as a bug (SPL-29475) and in all likelihood deeper levels of nesting will be supported in a future release.

In the meantime, the work-around is to define collections that require 2 levels of depth from the top-level.

Here is a $SPLUNK_HOME/etc/apps/search/default/data/ui/nav/default.xml that defines a new "Saved Searches Test" top level nav bar item for saved searches matching "Test Search", with sub-groups for "Test Search 1", "Test Search 2" and "Test Search 3".

<nav>
  <view name="dashboard" default='true' />
  <view name="flashtimeline" />
  <collection label="Status">
    <collection label="Search activity">
      <view name="search_status" />
      <view name="search_detail_activity" />
      <view name="search_user_activity" />
      <view name="search_ui_activity" />
    </collection>
    <collection label="Index activity">
      <view name="index_status" />
      <view name="index_status_health" />
      <view name="indexing_volume" />
    </collection>
    <collection label="Server activity">
      <view name="splunkd_status" />
      <view name="splunkweb_status" />
    </collection>
    <view name="inputs_status" />
    <collection label="Scheduler activity">
      <view name="scheduler_status" />
      <view name="scheduler_user_app" />
      <view name="scheduler_savedsearch" />
      <view name="scheduler_status_errors" />
      <view name="pdf_activity" />
    </collection>
  </collection>
  <collection label="Views">
    <view name="charting" />
    <divider />
    <view source="unclassified" />
    <divider />
    <a href="https://answers.splunk.commanager/search/data/ui/views">Manage Views</a>        
  </collection>
  <collection label="Saved Searches Test">
   <collection label="With a 1">
    <saved source="unclassified" match="Test Search 1" />
   </collection>
   <collection label="With a 2">
    <saved source="unclassified" match="Test Search 2" />
   </collection>
   <collection label="With a 3">
    <saved source="unclassified" match="Test Search 3" />
   </collection>
   <saved source="unclassified" match="Test Search" />
  </collection>
  <collection label="Searches &amp; Reports">
    <collection label="Errors">
      <saved source="unclassified" match="error" />
    </collection>
    <collection label="Admin">
      <saved source="unclassified" match="Admin" />
    </collection>
    <collection label="Inputs">
      <saved source="unclassified" match="Inputs" />
    </collection>
    <saved source="unclassified" />
    <divider />
    <a href="https://answers.splunk.commanager/search/saved/searches">Manage Searches &amp; Reports</a>        
  </collection>
</nav>

Jason
Motivator

This is unfortunate, as it half-appears to work without giving an error. But thanks for testing it out for us!

0 Karma

Jason
Motivator

Filed support request.

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 ...