Dashboards & Visualizations

Change colour of input choice in dashboard

payl_chdhry
Path Finder

Hi all,

 

I am using linked list as input and have made it to look like tab by following one of the answer in the forum. Now i want to change the color colour of the input tab (each choice).

Is that possible, please help.

Labels (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Can you share the SimpleXML you already have?

0 Karma

payl_chdhry
Path Finder

@ITWhisperer  This is what we are using. My requirement is to only fill the box/tab with color (that is area within the border defined below) and not the whole input field set :

 

 

<form>
  <label>Data review test - payal</label>
  <fieldset submitButton="false">
    <input type="link" token="source_type" searchWhenChanged="true" id="source_tab1">
      <label>Type of Source</label>
      <choice value="source_type1" >Source1</choice>
      <choice value="source_type2" >Source2</choice>
      <choice value="source_type3" >Source3</choice>
      <choice value="source_type4" >Source4</choice>
      <change>
        <condition value="source_type1">
          <unset token="home_token"></unset>
          <set token="source_type1_token"></set>
          <unset token="source_type2_token"></unset>
          <unset token="source_type3_token"></unset>
          <unset token="source_type4_token"></unset>
        </condition>
        <condition value="source_type2">
          <unset token="home_token"></unset>
          <unset token="source_type1_token"></unset>
          <set token="source_type2_token"></set>
          <unset token="source_type3_token"></unset>
          <unset token="source_type4_token"></unset>
        </condition>
        <condition value="source_type3">
          <unset token="home_token"></unset>
          <unset token="source_type1_token"></unset>
          <unset token="source_type2_token"></unset>
          <set token="source_type3_token"></set>
          <unset token="source_type4_token"></unset>
        </condition>
        <condition value="source_type4">
          <unset token="home_token"></unset>
          <unset token="source_type1_token"></unset>
          <unset token="source_type2_token"></unset>
          <unset token="source_type3_token"></unset>
          <set token="source_type4_token"></set>
        </condition>
        <condition>
          <set token="tokLabel">$label$</set>
          <set token="home_token"></set>
        </condition>
      </change>
    </input>
    <html>
        <style>
          /* This Layout Panel Bottom Padding removed to merge Link Input with horizontal line */
          #panel_layout .fieldset{
            padding: 10px 12px 0px 12px !important;          
          }
          /* Increase width of Link input to have options in Single Line */
          #source_tab1.input-link{
            width:100%;
          }
          /* Change from flex to -webkit-box for side by side layout */
          #input_radio_split_by.input-link div[data-component="splunk-core:/splunkjs/mvc/components/LinkList"]{
            display: -webkit-box !important;
          }
          /* Create Button Border to make them appear as Tabs */
          #source_tab1.input-link busplutton{
            /*width: 120px !important;*/
            border-top-color: rgb(255, 255, 255);
            border-top-style: solid;
            border-top-width: 1px;
            border-right-color: rgb(255, 255, 255);
            border-right-style: solid;
            border-right-width: 1px;
            border-left-color: rgb(255, 255, 255);
            border-left-style: solid;
            border-left-width: 1px;
            border-top-left-radius: 10px;
            border-top-right-radius: 10px;
          }
          /* Hide link input bottom message section to merge with Horizontal line */
          .dashboard-panel #input_link_split_by label,
          #source_tab1 .splunk-choice-input-message{
            display: none !important;
          }
          /* Remove padding from horizontal line */
          #panel_layout .panel-body.html{
            padding: 0px !important;
          }
        </style>
        <hr style="height:1px;border-width:0;color: black;background-color: white;margin: 0px;"/>
      </html>
  </fieldset>
    <row>
    <panel depends="$initial_token$" id="initial_panel">
      <title>Click on input values to view results</title>
        <html>
        <style>
   /*       #initial_panel .dashboard-panel{
             background-color:#F0F0F0 !important;
            }*/
          .dashboard-row #initial_panel .dashboard-panel h2.panel-title {
             font-size: 20px !important;
             color:#1A237E !important;
             allign: center;
             }
         </style>
      </html>
    </panel>
  </row>
 </form>
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Thanks. Can you share the simpleXML for your inputs too?

0 Karma

payl_chdhry
Path Finder

@ITWhisperer I have updated my response.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
          #source_tab1.input-link div[role="radiogroup"] button:nth-child(3n+1){
            background-color: green !important;
            color: yellow !important;
          }
          #source_tab1.input-link div[role="radiogroup"] button:nth-child(3n+2){
            background-color: blue !important;
            color: yellow !important;
          }
          #source_tab1.input-link div[role="radiogroup"] button:nth-child(3n+0){
            background-color: red !important;
            color: yellow !important;
          }
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...

Customer success is front and center at .conf25

Hi Splunkers, If you are not able to be at .conf25 in person, you can still learn about all the latest news ...