All Apps and Add-ons

Sideview: Switcher module with textfields

Communicator

I am building a dashboard form using the Tab -> Switcher -> TextField modules (in that order). After the Switcher module, I have multiple TextFields that I want to change based on the selection of the tab upstream. Overall, this all works fine, however, for every TextField I add, regardless if it's being shown, takes up space on the page.

So for instance, one tab should only show about 3 TextFields, the other remaining 12-15 are hidden due to not being in the selected group. The panel these fields are in though goes all the way down the page as if they were present. Am I doing something wrong? Thanks.

0 Karma

SplunkTrust
SplunkTrust

This looks like a bug in the core Splunk UI that was introduced by some changes they made to the dashboard template.

To make a long story short, I can reproduce the bug also with Splunk's TabSwitcher module. To understand what's happening, it's actually the dashboard template that resizes its rounded-corner panels to the correct heights. (It does this just for the more complex cases where it has to make all the panels in a single row the same height). So you can picture the javascript of Splunk's dashboard template constantly trying to shrink wrap itself around the modules that each row of panels contains.

Formerly the dashboard template would fire a resize event after the page was loaded, and this would catch cases where there were no searches being dispatched. It looks like this resize event has been removed, so dashboard views load sort of strange now, if there are no searches being dispatched on the page. On the other hand if there are searches being dispatched then there are lots of events that will tell the dashboard system to rejigger the panels. This I think is why the bug doesn't come up very often - having a dashboard template with no automatic searches is not common.

Can you verify that in your particular view there are no searches being dispatched automatically when the page loads? If that's not the case for you then quite possibly I'm on the trail of a completely different problem here. 😃

SplunkTrust
SplunkTrust

Oh. yea. there's a regression in Splunk where it no longer tells you when you're rendering modules into nonexistent layout panels. Once upon a time it would have told you "layoutPanel panel_row1_col1 does not exist", but these days it just throws the modules away. Another thing I could patch from Sideview Utils but I haven't. Just look to your layoutPanels. The space of valid layoutPanels is different in search.html vs dashboard.html

0 Karma

Communicator

Just a quick follow up, I changed the template to "search.html" and no modules show up anymore. I tested this by starting a new dashboard, setting the template to "search.html" then tried adding a timeRangePicker and I don't see it.

I was able to rework my original dashboard though so it's not as bad as it was, basically consolidated some of the fields I was duplicating. It will work for now.

If you have any ideas why the search.html is not working it would be much appreciated. Thanks.

0 Karma

Communicator

Sounds like a plan, thanks so much for the quick turn around and direction!

0 Karma

SplunkTrust
SplunkTrust

Got it. OK thanks for confirming. Since no searches are dispatched, the dashboard template's resize script never fires, so the rounded-corner panels remain wedged open. It's basically a bug in Splunk's dashboard template, but that doesn't mean I can't fix it from Sideview Utils. I'll put it in the queue and try and write back if I get a fix in.

I guess in the meantime, an easy workaround is to use the search.html template instead of dashboard.html... And a hard one is to write a little custom JS in document.ready() to carefully call Splunk.Globals.DashboardManager.equalizeHeights();

Communicator

Every search module within my dashboard is a child to a button module with allowAutoSubmit=False. From my understanding this means all processing stops at the button until it is pressed, is that correct?

The basic order of operation I have setup is:

TimeRangePicker -> Tabs -> TextFields -> Switcher..

Beneath switcher, I have one of two variances:

1)
Button -> Search -> Pager -> SimpleResultsTable

2)
Checkboxes -> Button -> Switcher -> Search(es) -> Pager -> SimpleResultsTable

Thanks for your help!

0 Karma

Communicator

Also, i'm currently using version 2.4.6 of Sideview Utils

0 Karma