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!

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
Champion

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
Get Updates on the Splunk Community!

Improve Your Security Posture

Watch NowImprove Your Security PostureCustomers are at the center of everything we do at Splunk and security ...

Maximize the Value from Microsoft Defender with Splunk

 Watch NowJoin Splunk and Sens Consulting for this Security Edition Tech TalkWho should attend:  Security ...

This Week's Community Digest - Splunk Community Happenings [6.27.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...