Dashboards & Visualizations

navigation menu xml default option

kenvanderheyden
Path Finder

Hello,

I've been testing a navigation menu for a dashboard in my own app, in spunk 6.2.1.

With exception to the default="true" option everything works fine.
Seems like I will have to make a choice between: nice labels in my custom menu OR a default dashboard opening in my app.

So: the default="true" option works if I put it in a tag.
But the view tag does not have a label option.

For nice labels in the custom menu, I've used tags. Problem with these is the default option does not work.
Even tried nesting a and view tags, but that does not work either.

Furthermore: if I mix view and a tags in my menu: the default selected panel is the first declared with a view tag.
When using only a tags: the last element in the xml is the default selected panel.

So the question is:
How can I combine both "a" and "view" tags to get clean looking labels, and select a default dashboard at the same time ?

Example code of the many tests:

<nav color="#608EE0">
    <collection label="My Dashboards">
        <a href="http://localhost:8000/en-US/app/launcher/home">Home screen</a>
        <a href="dashboards">Dashboards overview</a>
        <a href="cars_twitter_analysis__test_app" default="true">Cars tweet analysis</a>
    </collection>
    <collection label="Reports">
        <view name="reports" />
    </collection>
    <collection label="Alerts">
        <view name="alerts" />
    </collection>
</nav>

It would be nice if the "view" tags had a "label" option enabled. Or if "a"tags would check the default="true" option.

Regards,
Ken.

0 Karma
1 Solution

kenvanderheyden
Path Finder

Ok, I found a working solution:

Apparently you have to nest the view tag inside the a tag (and not the other way around):

<a href="cars_twitter_analysis__test_app" ><view name="cars_twitter_analysis__test_app" default="true" />Cars tweet analysis</a>

This works fine, shows a nice "label" in the custom menu, and is the default dashboard displayed when starting the app.

View solution in original post

kenvanderheyden
Path Finder

Ok, I found a working solution:

Apparently you have to nest the view tag inside the a tag (and not the other way around):

<a href="cars_twitter_analysis__test_app" ><view name="cars_twitter_analysis__test_app" default="true" />Cars tweet analysis</a>

This works fine, shows a nice "label" in the custom menu, and is the default dashboard displayed when starting the app.

lmyrefelt
Builder

Nice, glad you figured it out ... i am sure this will come in handy 🙂

0 Karma

lmyrefelt
Builder

Maybe you cannot combine a a href and default="true" (i dont think so at least) ... you can also try with a single ' default='true' ... if that changes anything ...

Or you can build a simple xml view and embed your linked page?

0 Karma

kenvanderheyden
Path Finder

Hi,

Thanks for the tip.
Single quotes don't seem to be working.
And just for completeness: without the quotes around 'true', it fails to save due to an error (and that is ok).

I'll check the embedded page option.

Thanks,
Ken.

0 Karma
Get Updates on the Splunk Community!

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

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...