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” >
Here in the above screen shot it is showing all the navigation buttons on the top right corner of the dashboard.
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.
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;
}
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” >
Here in the above screen shot it is showing all the navigation buttons on the top right corner of the dashboard.
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
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;
}
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” >
Here in the above screen shot it is showing the Edit button.Click on the Edit button.
Now you can find the UI and Source button on the top left corner.
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
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 !!