I have an inventory dashboard. I'd like to have a checkbox to "show these items only".
My thinking is, when checked, the search will be applied. when unchecked, the search will be ignored. hope that makes sense.
Hey, I don't know if this is exactly what you wanted, but I hope It helps you.
I have created a dashboard containing two checkboxes, one returns all of my deployments, and the other one returns just AWS hosts (The "All" check box is the default one).
If I select the "AWS" check box I will have as results just my AWS hosts:
Below is my dashboard source code:
<form>
<label>Assets</label>
<fieldset submitButton="false">
<input type="checkbox" token="deployment" searchWhenChanged="true">
<label>Deployment</label>
<choice value="*">All</choice>
<choice value="aws">AWS</choice>
<search>
<query/>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<delimiter> </delimiter>
<default>*</default>
</input>
</fieldset>
<row>
<panel>
<table>
<title>Assets</title>
<search>
<query>index=answers source=assets.csv deployment=$deployment$
| table hostname, os, deployment</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<option name="drilldown">none</option>
<option name="refresh.display">progressbar</option>
</table>
</panel>
</row>
</form>
i need to run a search for my "aws" choice. i have no common value to use. hope that makes sense. thanks for the reply!
You mean you need to dynamically populate the check box options?
If that case, you can populate your check box options like this:
<fieldset submitButton="false">
<input type="checkbox" token="deployment" searchWhenChanged="true">
<label>Deployment</label>
<choice value="*">All</choice>
<search>
<query>index=answers source=assets.csv
| dedup deployment
| table deployment</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<delimiter> </delimiter>
<default>*</default>
<fieldForLabel>deployment</fieldForLabel>
<fieldForValue>deployment</fieldForValue>
</input>
</fieldset>
this is what I'm doing now. its giving me a list checkboxes with the values my search returns. while it works, it does not look good lol.