Dashboards & Visualizations

How to reference various elements in Splunk Dashboard

kaeleyt
Path Finder

Hi fellow Splunkers!

I'm trying to figure out how to customize the subtitle of a dashboard (bold the font or change the font size for example). I'm currently using a hidden HTML style panel within my XML so if possible I'd like to continue with that method rather than converting the whole dashboard to HTML.

 

<row>
    <panel>
      <title>Quick Stats</title>
      <single>
        <title>User Counts</title>
        <search>
......
        </search>
      </single>
    </panel>
</row>

 

The "User Counts" title is the one I am interested in adding specific styles to.

Here is an example of how I am currently customizing some of the elements of my dashboard:

 

...
<row>
    <panel>**<html depends="$hiddenForCSS$">**
           <style>
             .dashboard-row {
             padding-bottom: 5px !important;
             padding-top: 5px !important;
             }
            .dashboard-panel h2{
             background:#65A637 !important;
             color:white !important;
             text-align: center !important;
             font-weight: bold !important;
             border-top-right-radius: 15px !important;
             border-top-left-radius: 15px !important;
            }
           </style>
          </html>
    </panel>
  </row>
...

 

I'm mainly trying to identify the correct way to reference the subtitle but if anyone has any general tips for the best way to identify the correct way to reference the various dashboard elements, that would be super helpful as well.

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust
Perhaps this blog posting by a Splunker will help.
https://www.splunk.com/en_us/blog/tips-and-tricks/splunk-clara-fication-customizing-simplexml-dashbo...
---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust
Perhaps this blog posting by a Splunker will help.
https://www.splunk.com/en_us/blog/tips-and-tricks/splunk-clara-fication-customizing-simplexml-dashbo...
---
If this reply helps you, Karma would be appreciated.

kaeleyt
Path Finder

@richgallowayThat was very helpful. I was able to find the element by going in to the developer tools, narrowing down to just one of the panels and then once I got down to the subtitle I clicked on it and it actually ends up displaying the exact syntax I can just copy and paste into the XML to override.

Example answer for anyone who needs this:

.dashboard-row .dashboard-panel .panel-head h3{
            font-size: 20px !important;
            }

Thank you so much!

 

0 Karma
Get Updates on the Splunk Community!

Build Scalable Security While Moving to Cloud - Guide From Clayton Homes

 Clayton Homes faced the increased challenge of strengthening their security posture as they went through ...

Mission Control | Explore the latest release of Splunk Mission Control (2.3)

We’re happy to announce the release of Mission Control 2.3 which includes several new and exciting features ...

Cloud Platform | Migrating your Splunk Cloud deployment to Python 3.7

Python 2.7, the last release of Python 2, reached End of Life back on January 1, 2020. As part of our larger ...