Dashboards & Visualizations

How to hide or remove the "edit" button from an app's user interface?

f_luciani
Path Finder

I am using Splunk Enterprise 6.1.2 on Linux. I have created an app, a role and an user.

  • The user has only reading permission for the app's objects, default app is the aforementioned app
  • The role has been set to minimum capabilities (rtsearch, search and rest_properties_get) and is associated to the user
  • The app has only 2 views and one navigation item, and the user has only read permission for all objects

I did not want to give access to anything else but this app for this users. I have tried to hide the menus but the App menu persisted, so I had to hide the navigation bar completely (meaning the user has no menus, thus cannot proceed logout). It is not the most elegant solution but I tried to isolate the user the best way I could, nav, views, xml inside the static directory, to no avail, hence no cigar. Thing is, unfortunately the "edit" button stays in place, as well as the "print" and the "pdf export" button. The latest two are of no concern, but the "edit" button shows the "clone" option, thus allowing the user to clone the dashboard, edit the cloned dashboard and even have access to the rest of splunkweb, including search and other sensitive info. How can I get rid (hide or remove) the button or, at least, the only option that remained and is preventing me to send the user into prod? I can live with the fact that the user must close the browser window since there is no logout option available, but I cannot afford to have this user accessing sensitive information.

0 Karma

raghu_vedic
Path Finder

HI,

Create dashboard.css file inside apps//appserver/static/dashboard.css

add this line inside dashboard.css then restart splunk & check it. 🙂

.btn-group:first-child{
display:none;
}

mhornste
Path Finder

Hi,

is there a way to prevent this only for certain users?

Thanks!

0 Karma

Umesh_Vedicsoft
Path Finder

great job....!:)

0 Karma

abhayneilam
Contributor

Really Awesome Raghu !!

0 Karma

kenvanderheyden
Path Finder

Hello,

Another option is to alter the dashboard tag in the dashboard xml:

<dashboard hideEdit="true">

For an overview of the available options:
http://docs.splunk.com/Documentation/Splunk/6.2.1/Viz/PanelreferenceforSimplifiedXML

Regards,
Ken.

jaxjohnny2000
Builder

Also works for a form:

<form hideEdit="true">

and if you only want to remove the Export button:

<form hideExport="true">

OR

<dashboard hideExport="true">

 

0 Karma

snemiro_514
Path Finder

1.In 6.1, at the end, add the following info to the CSS file:
/opt/splunk/etc/apps//appserver/static/application.css


    /* To disable the navbar */
 .navbar {
            display: none; }


  /* To disable the buttons */
 .dashboard-view-controls {
            display: none !important;

    }


------
Then, add the stylesheet to the XML view (in my case, a form)

    <form refresh="600" stylesheet="application.css">
    .
    .
    .

Then, restart splunk.

Remember to empty your browser cache.