Dashboards & Visualizations

Combining a text box and dropdown search

mlevenson
Explorer

I am trying to combine and give the option of either doing a text box search or a dropdown search from the same form. I can get the text search to work but the dropdown returns no data. I only want a single chart to be displayed. Is this possible or am I limited to either or in a form?

0 Karma

mlevenson
Explorer

The dropdown works as I pulled it from an existing one that I created.


host=$Server$ counter="% Processor Time" | timechart avg(Value) by host
fieldset
input type="text" token="Server" />

/fieldset

searchTemplate>host=$host$ counter="% Processor Time" | timechart avg(Value) by host
/searchTemplate>
fieldset
input type="dropdown" token="host"

Any

       <populatingSearch fieldForValue="host" fieldForLabel="host">
        <![CDATA[ counter="% Processor Time" | stats count by host]]>
       </populatingSearch>
</input>
  input type="time"
  <default>Last 24hrs</default>  

/fieldset

row

  chart
        title>CPU Usage


       <option name="charting.chart">column</option>
    <option name="charting.primaryAxisTitle.text">Time</option>
    <option name="charting.secondaryAxisTitle.text">CPU %</option>
    <option name="charting.legend.placement">right</option>

  </chart>


0 Karma

lguinn2
Legend

You can have both. Can you show us the XML? Perhaps there is a typo in the XML for your dropdown.

0 Karma

nisha_kapoor
Path Finder

How exactly do you combine the dropdown and the text box so that the user can use whichever one he prefers? I have a simple dropdown, how do I add textbox functionality to a dropdown?

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...