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.
This looks like a bug in the core Splunk UI that was introduced by some changes they made to the dashboard template.
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. 😃
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
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.
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
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:
Button -> Search -> Pager -> SimpleResultsTable
Checkboxes -> Button -> Switcher -> Search(es) -> Pager -> SimpleResultsTable
Thanks for your help!