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!

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

&#x1f342; Fall into November with a fresh lineup of Community Office Hours, Tech Talks, and Webinars we’ve ...

Transform your security operations with Splunk Enterprise Security

Hi Splunk Community, Splunk Platform has set a great foundation for your security operations. With the ...

Splunk Admins and App Developers | Earn a $35 gift card!

Splunk, in collaboration with ESG (Enterprise Strategy Group) by TechTarget, is excited to announce a ...