Navigation XML reference
The nav element is the root element of the navigation XML definition and can contain one or more child elements that indicate the navigation menu options.
The navigation definition uses the following element hierarchy.
xml<nav color={hexadecimal} search_view={view}><viewname={view}default={"true"|"false"}|source={"all"|"unclassified"}match={string}/> (0..n)
nav element
Use the following attributes to configure the nav element.
Name | Type | Description |
|---|---|---|
color | string | A hexadecimal color value. This color sets the background of an app icon and is only visible if the icon has transparency. |
search_view | string | The target dashboard for search. The default value is "search". |
Here's an example of how you can use the nav element:
xml<nav search_view="search" color="#0072C6">
view element
The view element specifies dashboards and views to display.
xml<viewname={view}default={"true"|"false"}|source={"all"|"unclassified"}match={string}/>
Use the following attributes to configure the view element.
Name | Type | Description |
|---|---|---|
name | string | The name of the view. |
default | Boolean | Indicates whether the view is the default home page for the app. |
source | string | The type of dynamic list. Possible values are "all" for all views, and "unclassified" for views that have not been explicitly referred to in default.xml. |
match | string | A substring to match. |
Here's an example of how you can use the view element:
xml<view name="my_new_dashboard" default="true" />
saved element
The saved element specifies reports to display.
xml<savedname={report}view= view}|source={"all"|"unclassified"}match={string}/>
Use the following attributes to configure the saved element.
Name | Type | Description |
|---|---|---|
name | string | The name of the report to display. |
view | string | The name of the view in which to display the report. |
source | string | The type of dynamic list. Possible values are "all" for all reports, and "unclassified" for reports that have not been explicitly referred to in default.xml. |
match | string | A substring to match. |
Here's an example of how you can use the saved element:
xml<saved source="unclassified" match="top" />
collection element
The collection element defines a list of views, reports, and/or links to display. Two levels of nesting are supported.
xml<collection label={label}><view /> (0..n)<saved /> (0..n)<a /> (0..n)</collection>
Use any combination of view, saved, and/or a child elements in a collection.
Here's an example of how you can use the collection element:
xml<collection label="All reports + dashboards"><saved source="all" /><view source="all" /></collection>
a element
The a element defines a hyperlink.
xml<a href={URL} target={target}>{text}</a>
Use the following attributes to configure the a element.
Name | Type | Description |
|---|---|---|
href | string | The URL. |
target | string | Specifies where to open the link. The default is "_self", which opens the link in the same window. Use "_blank" to open the link in a new window or tab. |
icon. | string | Specifies the modern navigation icon to show. For more information about Cisco Splunk modern navigation icons, see react-icons(Opens new window) in the Splunk Design System documentation. |
Supported icon strings with their react-icon mappings:
bookmark:<Bookmark />chartgauge:<ChartGauge />chartline:<ChartLine />chartpanels:<ChartPanels />cog:<Cog />circlesfour:<CirclesFour />cylinderindex:<CylinderIndex />filechart:<FileChartColumn />filemagnifier:<FileMagnifier />forwarderuniversal:<ForwarderUniversal />layoutoverview:<LayoutOverview />layerstriple:<LayersTriple />magnifier:<Magnifier />monitor:<Monitor />filenode:<FileNode />organizernotebook:<OrganizerNotebook />pulse:<Pulse />star:<Star />tag:<TagMarkerRight />
Here's an example of using the a element with a blank target:
xml<a href="https://dev.splunk.com/enterprise" target="_blank">Splunk Developer Portal</a>
Here's an example of using the a element with a star icon:
xml<a href="/search" icon="star"/>