Hello everyone,
I wants to create a dropdown that will list all of my hosts based on a source selected by a radio button.
How can i do that ?
Here is my code, actually not working :
Thanks you
Hi,
here is my Advanced XML to create a Dropdown list populated with a search. My suggestion is to put another pulldown around it to let you select your source and use that parameter in the subsequent search that will finally populate the second dropdown.
Regards,
Stefano
In Splunk 6, this is now possible using Simple XML as part of the re-design to enable the use of tokens anywhere in the page.
There is an example of this "Cascading Form Input" within the "Splunk 6 Dashboard Examples" App (http://apps.splunk.com/app/1603/).
Here is the example XML:
<form>
<label>Cascading Form Input Element</label>
<description>A form input element's selected value is used to populate another form input element's options.</description>
<fieldset autoRun="true">
<input type="dropdown" token="username">
<default>*</default>
<choice value="*">All</choice>
<populatingSearch fieldForValue="user" fieldForLabel="user" earliest="-24h" latest="now">
<![CDATA[index=_internal | stats count by user]]>
</populatingSearch>
</input>
<input type="radio" token="source">
<default>*</default>
<choice value="*">All</choice>
<populatingSearch fieldForValue="sourcetype" fieldForLabel="sourcetype" earliest="-24h" latest="now">
<![CDATA[index=_internal user=$username$| stats count by sourcetype]]>
</populatingSearch>
</input>
</fieldset>
<row>
<table>
<title>Table of events</title>
<searchString>index=_internal user=$username$ sourcetype=$source$ | head 1000 | table _time, user, sourcetype, _raw</searchString>
<earliestTime>-24h@h</earliestTime>
<latestTime>now</latestTime>
</table>
</row>
</form>
Hi,
here is my Advanced XML to create a Dropdown list populated with a search. My suggestion is to put another pulldown around it to let you select your source and use that parameter in the subsequent search that will finally populate the second dropdown.
Regards,
Stefano
have you installed sideview utils app?
Thanks but when i try to test this code, i code the error message "layoutPanel is not define for module pulldown" and for module search ect... what should i do ?
Nobody ? please !