Dashboards & Visualizations

How to hide the search of a dashboard panel or report?

zacksoft
Contributor

We don't want our end users to be able to see the SPL running behind the reports in the dashboard.
They are clicking on the lens icon and seeing the search and then mess around with it.
Can we make the dashboard just read-only. (no funny business of checking the source code, commands, etc)

0 Karma
1 Solution

renjith_nair
SplunkTrust
SplunkTrust

@zacksoft,

You can set below options to hide the links in panel

<option name="link.visible">false</option>

Also you could hide the edit button by including below in dashboard/form tag

<dashboard hideEdit="true">

Permissions of dashboard could be set to "read only" (edit permissions)

However users could still open a search bar and execute searches

Happy Splunking!

View solution in original post

renjith_nair
SplunkTrust
SplunkTrust

@zacksoft,

You can set below options to hide the links in panel

<option name="link.visible">false</option>

Also you could hide the edit button by including below in dashboard/form tag

<dashboard hideEdit="true">

Permissions of dashboard could be set to "read only" (edit permissions)

However users could still open a search bar and execute searches

Happy Splunking!

AnilPujar
Path Finder

Any idea? how to hide in studio dashboard?

0 Karma

zacksoft
Contributor

@renjith.nair
Could you please guide me where to add these two tags..
I get errors in Source while adding under form.
Here is how my dashboard sample looks like.

 <form>
      <dashboard hideEdit="true">
      <label>2.2 - Mayhem DB BSA Dashboard BURN</label>
      <fieldset submitButton="false" autoRun="true">
        <input type="time" token="field1">
          <label>Time-picker</label>
          <default>
            <earliest>-4h@m</earliest>
            <latest>now</latest>
          </default>
        </input>
      </fieldset>
      <row>
        <panel>
false
          <title>DB Configuration Lookup &lt; Data updated every 5 minutes &gt;</title>
          <table>
            <search>
              <query>host="host1.touchpiit.com" source="/apps/bsassian/Mayhem/logs/access_DB.log"| eval headers=split(_raw,";")
    | eval a=mvindex(headers,1)

    | eval b=mvindex(headers
    ......
    ......
    ......
    ......
    ......

      </panel>
      </row>
    </form>
0 Karma

renjith_nair
SplunkTrust
SplunkTrust

@zacksoft ,

Sure. Its in the form tag itself. It could be used for both dashboard and form tags. Here is an example for both hideEdit and link.visible

<!-- Hide Edit -->
<form hideEdit="true">
  <label>Hide Edit And Link</label>
  <fieldset submitButton="false">
    <input type="dropdown" token="field1">
      <label>Dummy</label>
    </input>
  </fieldset>
  <row>
    <panel>
      <table>
        <search>
          <query>index=_internal 
| stats count by sourcetype</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
        <!-- Below option to hide the search button -->
        <option name="link.visible">false</option>
      </table>
    </panel>
  </row>
</form>
Happy Splunking!
0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

Hello @zacksoft,

I don't know any way with access control we can restrict use for using that. But you can use css and JS to hide that button. You can use application.css and application.js to hide those through-out your app.

Hope this helps!!!

0 Karma

rajashaey
Engager

Is it possible to do using python script having in backend?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...