Deployment Architecture

How to change the certain fonts color in labels of dashboard?

akoy
New Member

I would like to ask if it's possible to change the certain fonts color in the label

For example

I would like the change of the font color applies only for "bbbbb".

Any suggestions aré greatly appreciated.
Thanks

Labels (1)
0 Karma

Taruchit
Communicator

Hi All,

I need your assistance similar to the topic of this thread. 

I have a table which has two columns: - Color and Description

I created the table with following SPL: -

<row>
	<panel>
		<table>
			<search>
				<query>
| makeresults
|eval Color="0", Description="Color = 0"
|append
[| makeresults
eval Legend=""
|eval Color="-1", Description="Color = -1"]| append
[| makeresults |
eval Color="1", Description="Color = 1"] | table Color, Description | sort Color
</query>
			</search>
			<format type="color" field="Color">
				<colorPalette type="map">{"0":#4FA484,"-1":#AF575A,"1":#006D9C}</colorPalette>
			</format>
		</table>
	</panel>
</row>

It gives a table with two columns, the first column has color in each cell based on the value. 

I need to hide the data in the first column. Thus, need your guidance related to it.table.png

Thank you

0 Karma

@akoy, you can set hideTitle to true to hide the default dashboard title. Then you can add an HTML Panel for your custom Dashboard Title with required CSS style.

alt text

Following is the Simple XML code for example screenshot:

<dashboard hideTitle="true">
  <label>Dashboard Title CSS</label>
  <row>
    <panel>
      <html>
        <div style="text-align:center;font-style:bold;color:blue;font-size:150%">Title of the dashboard TIME1/<div style="display:inline-block;text-align:center;font-style:bold;color:red;font-size:120%">MUST BE SELECTED</div></div>
      </html>
    </panel>
  </row>
</dashboard>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

akoy
New Member

Thanks for your for your comment.
However I'm afraid that is not exactly what I was trying to do.
Splunk I'm working at is intended for non developers so that they can search the data easily from the dashboard.
I would like this dashboard to be seen like this.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TIME1 / MUST BE SELECTED
"pull-down menu here where users choose time range for TIME1"

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Regards,

0 Karma

@akoy can you add screenshot of what you have and mock screenshot of what you need and also what is the SPL and current visualization you are using?

CSS Style override is depended on HTML DOM structure and hence community would be able to assist you better if you add further details.

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

akoy
New Member

Thanks @p_gurav I've already checked those links though... Maybe I didn't explain well enough. The code is as follows.

`
Title of the dashboard

TIME1 / MUST BE SELECTED

`
What I am trying to do is to change the colour "MUST BE SELECTED" to red (#ff0000).
@niketnilay I'm afraid I can't upload the screenshot but I hope the above explanation is enough to ask for an assist.

-splunk version : 6.5.1

Thanks.
,Thanks @p_gurav I've already checked those links though...
Maybe I didn't explain well enough.
The code is as follows.

<form hideChrome="true" hideEdit="true"> 
<label>Title of the dashboard</label> 
<fieldset submitButton="true">
<input type="time" token="TIME1" searchWhenChanged="false">              
<label>TIME1 / MUST BE SELECTED</label> 
<default> 
<earliest></earliest> 
<latest></latest> 
</default> 
</input>
<input type="time" token="TIME2"> 
<label>TIME2</label>
 <default> 
<earliest></earliest> 
<latest></latest> 
</default>
 </input>

What I am trying to do is to change the colour "MUST BE SELECTED" to red (#ff0000).

@niketnilay
I'm afraid I can't upload the screenshot but I hope the above explanation is enough to ask for an assist.
・splunk version : 6.5.1

Thanks.

0 Karma
Get Updates on the Splunk Community!

Routing Data to Different Splunk Indexes in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. The OpenTelemetry project is the second largest ...

Getting Started with AIOps: Event Correlation Basics and Alert Storm Detection in ...

Getting Started with AIOps:Event Correlation Basics and Alert Storm Detection in Splunk IT Service ...

Register to Attend BSides SPL 2022 - It's all Happening October 18!

Join like-minded individuals for technical sessions on everything Splunk!  This is a community-led and run ...