Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Splunk Developer's Guide, Second Edition

You're reading from   Splunk Developer's Guide, Second Edition Learn the A to Z of building excellent Splunk applications with the latest techniques using this comprehensive guide

Arrow left icon
Product type Paperback
Published in Jan 2016
Publisher
ISBN-13 9781785882371
Length 190 pages
Edition 2nd Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Kyle Smith Kyle Smith
Author Profile Icon Kyle Smith
Kyle Smith
Marco Scala Marco Scala
Author Profile Icon Marco Scala
Marco Scala
Arrow right icon
View More author details
Toc

Customizing Splunk dashboards using CSS

Now that we have covered the different types of JavaScript modules, let's start customizing our Overview dashboard. We already converted a SimpleXML dashboard to an HTML dashboard, but now we want to add some specific styling. We start by creating a dashboard CSS file in the appserver/static folder of our app. In this file, we will override specific Splunk CSS styles, as well as add a few of our own later on, specifically for a D3 visualization. Inside the dashboard.css file, add this CSS code:

.dashboard-row .dashboard-panel  {
  border: 1px dashed black;
}

This CSS will add a dashed border, 1 pixel in width, to each panel in the dashboard, overriding the native Splunk style. Now that we have a CSS file, we need to include it on the page. In order to override the Splunk CSS, you have to place the CSS include after the Bootstrap CSS included with Splunk. This is as simple as placing the code line following this paragraph before the closing head...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image