How to Hide the “Edit” Button from the Dashboard in Splunk

There are many ways of doing that :-

Process 1:

For a simple XML dashboard : –

Edit the below line in the source code of the existing dashboard. In this way all the navigation buttons will be hidden from the dashboard.

< dashboard hideEdit=”true” >

dash1

Here in the above screen shot it is showing all the navigation buttons on the top right corner of the dashboard.

dash2

You have to edit the first line in the source code of the dashboard. Here we have edited the line as <dashboard hideEdit=”true” >.

After editing this line click on Save button.

dash3

Now you can see that all the navigation buttons have been hidden from the dashboard.

**********************************************************************************

Process 2:

For a simple XML dashboard :-

You have to edit the application.css of your app

There will be already an application.css file into your app.You have to append the following mentioned lines with the existing file content.

Go to :

# cd /opt/splunk/apps/search/appserver/static

# vi application.css

/* To disable the navbar */

.navbar {

        display: none;

       }

/* To disable the buttons */

.dashboard-view-controls {

        display: none !important;

}

dash5

Now edit the existing dashboard

Edit the below line in the source code of the existing dashboard. In this way all the navigation buttons will be hidden from the dashboard.

<dashboard stylesheet=”search:application.css” >

dash4

Here in the above screen shot it is showing all the navigation buttons on the top right corner of the dashboard.

dash6

You have to edit the first line in the source code of the dashboard. Here we have edited the line as <dashboard stylesheet=”search:application.css” >.

After editing this line click on Save button.

Then refresh your dashboard once where it is working or not.If it is not working then restart the splunk once then the changes will effect.

# /opt/splunk/bin/splunk restart

dash7

Now you can see that all the navigation buttons have been hidden from the dashboard.

************************************************************************************

Process 3:

For a simple XML dashboard :-

You have to edit the dashboard.css of your app

There will be already an dashboard.css file into your app. You have to append the following mentioned lines with the existing file content.

Go to :

# cd /opt/splunk/apps/search/appserver/static

# vi dashboard.css

.btn-group: {

display: none;

}

dash10

Now edit the existing dashboard

Edit the below line in the source code of the existing dashboard. In this way  UI and Source buttons will be hidden from the dashboard.

<dashboard stylesheet=”search:dashboard.css” >

dash8

Here in the above screen shot it is showing the Edit button.Click on the Edit button.

dash9

Now you can find the UI and Source button on the top left corner.

dash12

You have to edit the first line in the source code of the dashboard. Here we have edited the line as  <dashboard stylesheet=”search:dashboard.css” >.

After editing this line click on Save button.

Then refresh your dashboard once where it is working or not.If it is not working then restart the splunk once then the changes will effect.

# /opt/splunk/bin/splunk restart

dash11

Now you can see that from your dashboard the UI and Source button will be hidden.

*********************************************************************************

Process 4 :

For an advanced XML dashboard :-

……………. ? showsource=advanced

Remove the below line from the source:

<module name=”DashboardTitlebar” layoutPanel=”viewHeader” />

 

Hope this has helped you in achieving the below requirement without fail :

How to Hide the “Edit” Button from the Dashboard in Splunk

 

Happy Splunking !!

Advertisements