Custom look and feel
In this section, you will learn how to use custom CSS and JS to customize the look and feel of Splunk dashboards. In the previous topics and chapter, we used CSS and JS to customize the functionality of the dashboard. In this section, we will modify the look and feel (aesthetics) of the Splunk dashboard.
The Splunk dashboard has its predefined stylesheets, which are automatically applied on any new dashboards created in Splunk. You will now learn how to override the default stylesheet behavior with your own custom CSS file.
Example and implementation
The following steps are required to use custom CSS file on any dashboard XML page:
Create a CSS file (say,
layout.css
) at$SPLUNK_HOME$\etc\apps\app_name\appserver\static
.Go to the Splunk Web Console | Dashboard | Edit Source (for which the custom layout is to be applied).
Direct the dashboard to use custom CSS file by modifying the XML code as follows:
<dashboard stylesheet="layout.css">
If the dashboard has a
form
tag,...