Dashboards & Visualizations

Italicize Text inside a Splunk Dashboard

Marco
Communicator

I am trying to figure out how to italicize text in a Splunk dashboard. I've done this using the HTML Tags and it works but it's not giving me what I want.

Is there a way to italicize text using simple XML?

 

Thank you,

Marco

Labels (4)
0 Karma
1 Solution

ITWhisperer
Ultra Champion

You are correct - the dashboard XML schema doesn't support child nodes of the description tag, which you would need in order to be able to apply a different style.

The closest you can get is to put an HTML panel as your very first panel in your dashboard, but this will appear below any fieldset you might have.

Another possibility is that you could apply a style to this HTML panel so it appears elsewhere on the page, but calculating where that should be might be tricky 😀

ITWhisperer_0-1617978500350.png

 

View solution in original post

Marco
Communicator

@ITWhisperer Thank you, Originally I tried that but it creates  a whole new "Panel" .  At this point I am starting to believe italics cannot be done inside the description tags.  Correct me if I'm wrong.

 

Best Wishes,

Marco

0 Karma

ITWhisperer
Ultra Champion

You could try putting the HTML block in the fieldset (if you have one) so it appears closest to the top of the dashboard

  <fieldset submitButton="false" autoRun="true">
    <html id="subheading">
      This line contains some <span style="font-style: italic;">italic text</span> in the middle
    </html>
0 Karma

ITWhisperer
Ultra Champion

You are correct - the dashboard XML schema doesn't support child nodes of the description tag, which you would need in order to be able to apply a different style.

The closest you can get is to put an HTML panel as your very first panel in your dashboard, but this will appear below any fieldset you might have.

Another possibility is that you could apply a style to this HTML panel so it appears elsewhere on the page, but calculating where that should be might be tricky 😀

ITWhisperer_0-1617978500350.png

 

View solution in original post

ITWhisperer
Ultra Champion

Which text are you trying to italicise? Depending where it is, you may be able to apply 

font-style: italic;

to the text.

0 Karma

Marco
Communicator

@ITWhisperer  I am trying to add Italics to the description tag

<dashboard>
  <label>test</label>
  <description>I want to italicize this text ---&gt; This Text &lt;-----</description>
</dashboard>

Italics.jpg

0 Karma

ITWhisperer
Ultra Champion

You can make the whole description italics

 

    <panel depends="$stayhidden$">
      <html>
        <style>
          p.description {
            font-style: italic;
          }
        </style>
      </html>
    </panel>

 

but possibly not part of the element

Or, you could just add a block of html

  <row>
    <html>
      This line contains some <span style="font-style: italic;">italic text</span> in the middle
    </html>
  </row>
.conf21 CFS Extended through 5/20!

Don't miss your chance
to share your Splunk
wisdom in-person or
virtually at .conf21!

Call for Speakers has
been extended through
Thursday, 5/20!