Dashboards & Visualizations

How do I change the color of a Dashboard Description and add captions?

egreg7
Engager

How do I change the color of a Dashboard Description and also add captions within Splunk Dashboard

0 Karma

nit123
Path Finder

Using custom CSS
The look of the Splunk application is controlled via CSS. One common element to change is the application icon in the application bar. Follow these steps to do just that:
1. First, create a file named application.css. This file will be loaded on every dashboard of the application containing it. The CSS is listed later in this section.
2. Next, create a file named appLogo.png. This file can be called anything, as we will reference it explicitly in our CSS file. Borrowing CSS from the search app, we will make our file 155 x 43 pixels
3. For each file, follow the same steps as for uploading the launcher icon:
1. Navigate to Manager | Apps.
2. Click on Edit properties next to our app, Implementing Splunk App One.
3. Click on Upload asset and select the file.
4. Click on Save.
Create CSS classes in the application header bar:
• .appHeaderWrapper h1: By default, the name of the app appears as text in the upper-left corner. This definition hides that text.
• .appLogo: This sets the background of the upper-left block to our custom file. The height and width should match the dimensions of our logo.
• .appHeaderWrapper: This sets the background color of the top bar.

0 Karma

niketn
Legend

@egreg7, you can do this through CSS, check out Custom Layout: Dark example in the Splunk 6.x Dashboard Examples app. This will be more maintainable if you want to apply a generic theme to your dashboards.

Alternatively, if you do not want to style through CSS file, you can create HTML panels for Title/Description in Dashboard (use hideTitle="true" for the dashboard in case you plan to use this. With HTML section you can define inline CSS style with the HTML tags. Refer to Null Search Swapper example in the Splunk 6.x Dashboard Examples app for setting inline style with HTML panels.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

rjthibod
Champion

What do you mean by captions?

0 Karma

rjthibod
Champion

Also, a simple way to change CSS settings for explicit classes and entities can be achieved using SimpleXML. You can add the following XML to your dashboard to change the font color of the Description. Just change "red" to another desired color.

  <row depends="$hidden$">
    <html>
      <style>
        .description {
          color: red; 
        }
      </style>
    </html>
  </row>
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...