|
I have several dashboards that I use the Sideview Utils Pulldown module on. The pulldowns grab a list of industries and customers out of our customer data, and then pass these values on to downstream searches. This works all without a problem, however when the Pulldowns are populated, they kick off the downstream searches automatically, causing all downstream searches to display data for All customers on page load. What I want them to do is load the pulldown values on page load, but not autoRun the searches downstream -- I want a submit button or similar so I can first select my desired pulldown combination before kicking off the downstream searches. I have tried SubmitButton and different autoRun=true/false combinations to no avail. Dashboard code:
|
|
You may get some mileage out of the Button module. Button is much like Splunk's SubmitButton module, except that a) it has an "allowAutoSubmit" param that does something pretty close to what you're looking for here, b) it allows a "customBehavior" to be attached to it, like any other Sideview module. c) The code was written from scratch so it's cleaner and simpler than SubmitButton and has less going on. So. 1) Add a Button module after your controls, 2) give it allowAutoSubmit False That will get you most of the way there. (I still recommend setting allowSoftSubmit to "True", despite the allowAutoSubmit "False".) However at a practical level there's always some confusion that you have to clean up. This is because when the page loads, the interface elements below the button "sort of" load when the page loads. Some things will be visible, some wont. Often the page looks broken overall and nothing "inhibits user interaction" quite like borkedness. What I have done in these situations is use the app's CSS to make certain div containers invisible in that view on page load, and then put a CustomBehavior module downstream from the SubmitButton, and onContextChange within that customBehavior, make those div containers visible using jquery. PS. Actually I lied, what I do is put a customBehavior param on the Button itself, but this is more advanced -- definitely if you're not really used to customBehaviors and not really familiar with the module framework methods, use the flavorless CustomBehavior module and stay away from trying to tinker with an existing module's methods in vivo. Hey Nick, thanks for the pointers. Button did indeed work, however I had to put both allowAutoSubmit and allowSoftSubmit to false. Setting allowSoftSubmit to false didn't garble the dashboard up in my case, all charts are invisible, works for me. Thanks!
(13 Feb, 12:49)
ftk ♦
Sorry I should have been clear -- I didn't recommend allowSoftSubmit True because there was any weird interaction with allowAutoSubmit. I just recommend allowSoftSubmit True because it's more of a standard across Splunk apps, and if you hit a user who's only used apps where it's set to True, they sometimes think that the UI is broken when the results never appear, and they never think to click the green button. Feel free to set allowSoftSubmit to whatever you like -- it will have no effect on allowAutoSubmit and the two params do separate things and function independently.
(13 Feb, 14:13)
nick ♦
|
