Archive

Sideview Utils: Is there a way to prevent a module from displaying on the dashboard?

Communicator

I have a search that I (temporarily) no longer want to run on one of my dashboards. Because the search includes a TimeRangePicker, Html, Search, SimpleResultsTable, and Redirector I don't want to delete them as I may want to use the search later on. Is there a way that I can prevent these modules from displaying to the user (or even running in the background) without deleting any of the modules?

I'm thinking a gate might work, but I'm wondering if there is a better way to do it.

Thanks

Tags (1)
0 Karma

SplunkTrust
SplunkTrust

1) Well, the simplest answer of course is to comment them out. I think since you're asking the question though, maybe you're a Sideview Editor user and the raw XML is not so much your friend, which is fine.

2) The next tool that I would think of if it were me would be to use CSS to hide either the modules or a common container that they were all in, like a layoutPanel. This would involve a few moments in Firebug, a bit of thought, and some additions to application.css If CSS isn't so much your friend either, this isn't a fantastic option.

3) The next tool, again that I would use, would be a customBehavior. This would be a pretty simple one. The module framework has a powerful mechanism whereby modules can hide and show eachother and hide and show downstream modules as well. This mechanism is smart enough to account for the arbitrarily different ways different client code might be trying to show/hide things. If you're familiar with Sideview customBehavior this is as simple as it gets. If Javascript is not so much your friend, this is "not a wine for drinking. It is a wine for laying down and avoiding".

4) There is one other thing I can think of, and that's to use the Sideview ShowHide module. (If you've never heard of ShowHide, it is one of the undocumented modules. The enterprising user might browse through the actual testcase views of Sideview Utils and the module directory itself and find some surprises).

ShowHide basically has a param "show" whose value is a comma separated list of CSS selectors, and a param "hide" with the same structure. You can set one or the other or both.

Whenever the module receives a push from upstream (Read docs page within Sideview Utils - "Introduction to the Advanced XML" if you don't know what this means), it will show the "show" selectors and hide the "hide" selectors. As a side note you can use $foo$ tokens in either.

Using it can get pretty slippery in complex use cases but I wont go into that here. Here you could just sneak one into the main autoRun branch, and have it hide something appropriate. For example if you were to temporarily banish the modules into their own layoutPanel row with layoutPanel="panel_row15_col1" then you could setpanel_row15col`. That probably looks like a typo but that is the row element so hiding it would hide all the modules therein.

0 Karma