Dashboards & Visualizations

How to hide all form input filters in a dashboard by default?

lakromani
Builder

In dashboard, if you add input, you will see a text Hide Filters.
I would like all the filters to be hidden in one dashboard by default.
The users need to click Show Filters.

Searching around and did not find anything.

alt text

1 Solution

sundareshr
Legend

Try editing your nav links to include a querystring with hideFilters=True

http://dev.splunk.com/view/webframework-developapps/SP-CAAAEP9

View solution in original post

marcoscala
Builder

You have to modify the source:

<form hideFilters="true">
...

This will work even with a default dashboard where you cannot modify the query string.

Marco

sundareshr
Legend

Try editing your nav links to include a querystring with hideFilters=True

http://dev.splunk.com/view/webframework-developapps/SP-CAAAEP9

datasearchninja
Communicator

I downvoted this post because the other answer on this page is more correct

0 Karma

lakromani
Builder

Did not work.

True also need to be quoted, so it should be some like this:

hidefilters='true'
hideFilters='true'
hideFilters='True'
0 Karma

evinasco
Communicator

Can I eliminate "Hide Filters" text from dashboard?

0 Karma

rjthibod
Champion

With CSS you can. Here is the CSS you need to add to a file in your app.

/* hide global input hiding button in 6.5+ */
a.hide-global-filters {
  display: none !important;
}

Alternatively, you can put this in a hidden row in the dashboard.

<row depends="$hiddenCSS$">
  <html>
    <style>
      a.hide-global-filters {
        display: none !important;
      }
    </style>
  </html>
</row>

evinasco
Communicator

Thanks, it worked !!!

0 Karma

rjthibod
Champion

Glad to hear it. You can upvote/like my comment to show that it helped.

rjthibod
Champion

Would it easier or cleaner to put it on top of the XML in the dashboard or form like the similar options listed here: http://docs.splunk.com/Documentation/Splunk/6.5.0/Viz/PanelreferenceforSimplifiedXML?

0 Karma

lakromani
Builder

Thanks it worked there:

0 Karma

saurabh009
Path Finder

I am also looking for similar solution. What you have added and where?

0 Karma

lakromani
Builder

Normal a dashboard starts like this:
<form>
Change it to:
<form hideFilters="true">
And you are done

saurabh009
Path Finder

Is it possible to remove hideFilters or showFilters link completely and show all the filters as default?
I am not able to remove them after upgrading Splunk to 6.5.2.

0 Karma

lakromani
Builder

Dont know. If some works with one version and not with other, make a support case.

0 Karma

saurabh009
Path Finder

Thanks, I will.

0 Karma

rmarcum
Explorer

My approach has been to put all of the filters in a panel at the top of the dashboard with no chart, table, etc. code in it (see below), then have a filter on the dashboard that does a Hide/Show on the panel. Unless there is at least one filter in the panel, Splunk will discard the panel. So, start with this, add some filters, then discard this filter.

<panel>
  <title>XXXX User Input Filters</title>
  <input type="multiselect" token="YYYY" searchWhenChanged="true">
    <label>Select XXXX </label>
    <choice value="*">All </choice>
    <choice value="A">First</choice>
    <choice value="B">Second</choice>
    <choice value="C">Third</choice>
    <default>A,C </default>
    <valuePrefix>MyField="</valuePrefix>
    <valueSuffix>"</valueSuffix>
    <delimiter> OR </delimiter>
  </input>
</panel>
0 Karma
Get Updates on the Splunk Community!

Monitoring MariaDB and MySQL

In a previous post, we explored monitoring PostgreSQL and general best practices around which metrics to ...

Financial Services Industry Use Cases, ITSI Best Practices, and More New Articles ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Splunk Federated Analytics for Amazon Security Lake

Thursday, November 21, 2024  |  11AM PT / 2PM ET Register Now Join our session to see the technical ...