Dashboards & Visualizations

How to hide Checkboxes from dashboard

sagar1992
Explorer

Hi Team,

I have one parent checkbox (All reports), after clicking on it, it sets and unsets the child token.

As I have many panels, I would like to hide child checkboxes. Is there any way to do this change. JAVASCRIPT is not in favor, normal XML configurations will do.

Screenshot below:alt text

@niketnilay - any help appreciated 🙂 Thank You.

0 Karma
1 Solution

vnravikumar
Champion

Hi

Try this

<form>
  <label>checkboxall</label>
  <fieldset submitButton="false">
    <input type="checkbox" token="field1" searchWhenChanged="true">
      <label></label>
      <choice value="all">All Reports</choice>
      <change>
        <condition value="all">
          <set token="form.field2">monthly</set>
          <set token="form.field3">daily</set>
          <set token="form.field4">table</set>
        </condition>
        <condition>
          <unset token="form.field2"></unset>
          <unset token="form.field3"></unset>
          <unset token="form.field4"></unset>
        </condition>
      </change>
      <delimiter> </delimiter>
    </input>
    <input type="checkbox" token="field2" searchWhenChanged="true" rejects="$field1$">
      <label></label>
      <choice value="monthly">Monthly Report</choice>
      <change>
        <condition value="monthly">
          <set token="showpanel1">true</set>
        </condition>
        <condition>
          <unset token="showpanel1"></unset>
        </condition>
      </change>
    </input>
    <input type="checkbox" token="field3" searchWhenChanged="true" rejects="$field1$">
      <label></label>
      <choice value="daily">Daily Report</choice>
      <change>
        <condition value="daily">
          <set token="showpanel2">true</set>
        </condition>
        <condition>
          <unset token="showpanel2"></unset>
        </condition>
      </change>
    </input>
    <input type="checkbox" token="field4" searchWhenChanged="true" rejects="$field1$">
      <label></label>
      <choice value="table">Monthly Report(Table Format)</choice>
      <change>
        <condition value="table">
          <set token="showpanel3">true</set>
        </condition>
        <condition>
          <unset token="showpanel3"></unset>
        </condition>
      </change>
    </input>
  </fieldset>
  <row>
    <panel depends="$showpanel1$">
      <table>
        <title>Monthly Report</title>
        <search>
          <query>index="_internal" |stats count by host</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
  <row>
    <panel depends="$showpanel2$">
      <table>
        <title>Daily Report</title>
        <search>
          <query>index="_internal" |stats count by host</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
  <row>
    <panel depends="$showpanel3$">
      <table>
        <title>Monthly Report(Table Format)</title>
        <search>
          <query>index="_internal" |stats count by host</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
</form>

View solution in original post

0 Karma

vnravikumar
Champion

Hi

Try this

<form>
  <label>checkboxall</label>
  <fieldset submitButton="false">
    <input type="checkbox" token="field1" searchWhenChanged="true">
      <label></label>
      <choice value="all">All Reports</choice>
      <change>
        <condition value="all">
          <set token="form.field2">monthly</set>
          <set token="form.field3">daily</set>
          <set token="form.field4">table</set>
        </condition>
        <condition>
          <unset token="form.field2"></unset>
          <unset token="form.field3"></unset>
          <unset token="form.field4"></unset>
        </condition>
      </change>
      <delimiter> </delimiter>
    </input>
    <input type="checkbox" token="field2" searchWhenChanged="true" rejects="$field1$">
      <label></label>
      <choice value="monthly">Monthly Report</choice>
      <change>
        <condition value="monthly">
          <set token="showpanel1">true</set>
        </condition>
        <condition>
          <unset token="showpanel1"></unset>
        </condition>
      </change>
    </input>
    <input type="checkbox" token="field3" searchWhenChanged="true" rejects="$field1$">
      <label></label>
      <choice value="daily">Daily Report</choice>
      <change>
        <condition value="daily">
          <set token="showpanel2">true</set>
        </condition>
        <condition>
          <unset token="showpanel2"></unset>
        </condition>
      </change>
    </input>
    <input type="checkbox" token="field4" searchWhenChanged="true" rejects="$field1$">
      <label></label>
      <choice value="table">Monthly Report(Table Format)</choice>
      <change>
        <condition value="table">
          <set token="showpanel3">true</set>
        </condition>
        <condition>
          <unset token="showpanel3"></unset>
        </condition>
      </change>
    </input>
  </fieldset>
  <row>
    <panel depends="$showpanel1$">
      <table>
        <title>Monthly Report</title>
        <search>
          <query>index="_internal" |stats count by host</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
  <row>
    <panel depends="$showpanel2$">
      <table>
        <title>Daily Report</title>
        <search>
          <query>index="_internal" |stats count by host</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
  <row>
    <panel depends="$showpanel3$">
      <table>
        <title>Monthly Report(Table Format)</title>
        <search>
          <query>index="_internal" |stats count by host</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
</form>
0 Karma

sagar1992
Explorer

@vnravikumar Thanks it worked!!

rejects="$field1$"

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...