Dashboards & Visualizations

Switcher ignoring labels - how can I present this correctly?

msarro
Builder

Hi everyone. I have an advanced XML dashboard using a pulldown switcher. The dash shows license burndowns for the majority of the modules, except for one which is supposed to show platform growth as a whole and some basic metrics. A lot of the panels in the dashboard need different labels when they're under this particular dropdown option. The others I was able to apply generic labels that mostly fit. Now I just have to get this part resolved.

I am using a layout similar to this:
http://splunk-base.splunk.com/answers/58835/tabs-in-tabswitcher-show-modules-from-other-tabs

The major difference is I had been using a "group="my group name"' option in the hiddenPostProcess module, and then a parameter under each module. However I quickly discovered that splunk seems to only listen to the first label given to a particular panel. Here is an example:

<module name="NullModule" group="Customer Growth">
    <module name="HiddenPostProcess" layoutPanel="panel_row1_col1" group="Customer Growth" autoRun="False">
        <param name="search">my search</param>
        <param name="groupLabel>Customer Growth </param>
...
</module>

<module name="NullModule" group="License Burndown">
    <module name="HiddenPostProcess" layoutPanel="panel_row1_col1" group="License Burndown" autoRun="False">
        <param name="search">my search</param>
        <param name="groupLabel">License Burndown</param>
...
</module>

In that example, the label that would show up on a dashboard would be "Customer Growth," and it shows up no matter which dropdown option I'm on.
If I modify the first panel to have it's group be named "License Burndown," every single dropdown option's first panel shows up with the label "License Burndown," whether I modify the groupLabel param or not.

How can I get different labels to show up? It seems like no matter what I do, the change to the first option's label is global for every option on the pulldown. It feels like a bug, since according to the module reference, the changes for each module are entirely independent.

I've tried setting it so the first option has rows 1, 2 and 3, and all other options have 4, 5, and 6, but then I run into the issue described in that earlier link where I have tons of empty cells showing up, but the labels actually look correct.

Any advice would be very much appreciated.

Example of what I am talking about (ignore that the numbers/graph are the same, that's actually supposed to be that way as I haven't put in the new searches for this particular option):
alt text
This is the first option, and it shows the correct labels.

alt text
This is the second option - as you can see, despite having different labels defined, it is showing the labels from the first option.

Tags (2)
1 Solution

sideview
SplunkTrust
SplunkTrust

Several things are going on here. First, the <param name="groupLabel"> nodes never do anything so you should always delete them. They are only there because of a longstanding bug in "simple xml conversion", and at some point in the history of this dashboard, something was converted from simple xml to create it.

Next - how the green panel headers get their text, is a weird mechanism where the module system as a whole kind of talks to the dashboard template. the modules themselves have no idea this is going on, which is why it breaks the normal encapsulation concept of module config.

Lastly, the green panel headers, since they're divorced from the actual modules, do not and cannot get switched out when the switcher changes the visibility of the modules.

The answer is to

1) simply not use group attributes for the green panel headers, if you need the header text to change when the switcher changes.
2) replace the green panel headers with a StaticContentSample module, or if you're using Sideview Utils, an HTML module, within which you have a simple HTML header.
3) Depending on where the switcher ends up, you will probably have to put a group=" " attribute somewhere just upstream of your switcher. Splunk modules like PulldownSwitcher and TabSwitcher, and the newer Sideview module "Switcher", all use the group attributes for the switching logic, but since the dashboard panel system uses them too for the green headers, you have to put that group=" " there to basically yank it away before the dashboard-panel logic sees it (or else it will create those unwanted green headers)

I hope this helps.

View solution in original post

sideview
SplunkTrust
SplunkTrust

Several things are going on here. First, the <param name="groupLabel"> nodes never do anything so you should always delete them. They are only there because of a longstanding bug in "simple xml conversion", and at some point in the history of this dashboard, something was converted from simple xml to create it.

Next - how the green panel headers get their text, is a weird mechanism where the module system as a whole kind of talks to the dashboard template. the modules themselves have no idea this is going on, which is why it breaks the normal encapsulation concept of module config.

Lastly, the green panel headers, since they're divorced from the actual modules, do not and cannot get switched out when the switcher changes the visibility of the modules.

The answer is to

1) simply not use group attributes for the green panel headers, if you need the header text to change when the switcher changes.
2) replace the green panel headers with a StaticContentSample module, or if you're using Sideview Utils, an HTML module, within which you have a simple HTML header.
3) Depending on where the switcher ends up, you will probably have to put a group=" " attribute somewhere just upstream of your switcher. Splunk modules like PulldownSwitcher and TabSwitcher, and the newer Sideview module "Switcher", all use the group attributes for the switching logic, but since the dashboard panel system uses them too for the green headers, you have to put that group=" " there to basically yank it away before the dashboard-panel logic sees it (or else it will create those unwanted green headers)

I hope this helps.

msarro
Builder

This worked really well, although instead of using StaticContentSample I used the genericHeader module. Only reason being that genericHeader displayed everything with the correct CSS right off the bat, and there was less fuddling around with trying to put in CSS inline. Thank you for the help!

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...