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!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...