Dashboards & Visualizations

How to highlight a radio button on a dashboard?

dbcase
Motivator

Hi,

I have this at the top of the dashboard:
alt text

The code that shows this is:

Beta Reports

<input type="time" token="field1" searchWhenChanged="true">
  <label>Select a Time Period</label>
  <default>
    <earliest>-6h</earliest>
    <latest>now</latest>
  </default>
</input>
<input type="radio" token="dummy" searchWhenChanged="true">

  <label>Show Help:</label>
  <default>No</default>
  <choice value="No">No</choice>
  <choice value="Yes">Yes</choice>
  <change>
    <condition value="No">
      <unset token="showhelp"></unset>
    </condition>
    <condition value="Yes">
      <set token="showhelp">awwwyeah</set>
    </condition>
  </change>
</input>

What I'd like to do is either (could be AND as well) somehow highlight the show help radio button and/or move the radio button to right justified.

The reason is the users either don't see the radio button or they think it is help for the select time period drop-down.

0 Karma
1 Solution

bmacias84
Champion

You can add css to a simple xml by using the tags in the panels. Here is a simple example of how to apply css. You will have to play with css to get exactly what you want.

    <panel>
      <html>
        <style>
          div#myRadio label:first-child { 
                    position: relative !important;
                    background-color: #b0e0e6;
                   }
        </style>
      </html>

  <input type="time" token="field1" searchWhenChanged="true">
   <label>Select a Time Period</label>
   <default>
     <earliest>-6h</earliest>
     <latest>now</latest>
   </default>
 </input>
 <input id="myRadio" type="radio" token="dummy" searchWhenChanged="true">

   <label>Show Help:</label>
   <default>No</default>
   <choice value="No">No</choice>
   <choice value="Yes">Yes</choice>
   <change>
     <condition value="No">
       <unset token="showhelp"></unset>
     </condition>
     <condition value="Yes">
       <set token="showhelp">awwwyeah</set>
     </condition>
   </change>
 </input>
    </panel>

Hope this helps.

View solution in original post

0 Karma

bmacias84
Champion

You can add css to a simple xml by using the tags in the panels. Here is a simple example of how to apply css. You will have to play with css to get exactly what you want.

    <panel>
      <html>
        <style>
          div#myRadio label:first-child { 
                    position: relative !important;
                    background-color: #b0e0e6;
                   }
        </style>
      </html>

  <input type="time" token="field1" searchWhenChanged="true">
   <label>Select a Time Period</label>
   <default>
     <earliest>-6h</earliest>
     <latest>now</latest>
   </default>
 </input>
 <input id="myRadio" type="radio" token="dummy" searchWhenChanged="true">

   <label>Show Help:</label>
   <default>No</default>
   <choice value="No">No</choice>
   <choice value="Yes">Yes</choice>
   <change>
     <condition value="No">
       <unset token="showhelp"></unset>
     </condition>
     <condition value="Yes">
       <set token="showhelp">awwwyeah</set>
     </condition>
   </change>
 </input>
    </panel>

Hope this helps.

0 Karma

dbcase
Motivator

Odd, the image didn't show but it is attached to the bottom of the question

0 Karma

ppablo
Retired

Hi @dbcase,

I just edited your question to show the image properly. Cheers

Patrick

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.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 ...