Hello All,
Is there any way to hide the panel ("search is waiting for input..")
I've got a dashboard, in which , two panels are dependent on the textbox input.
When the dashboard loads for the first time, my two panels will be
showing "search is waiting for input..."
Here is my requirement : when the dashboard loads initially, my textbox should be empty and i want to hide that warning message in panels instead display "- -" in the panels . I could make panel display with "- -" only if i simply click/press enter on the textbox input after the initial dashboard with warning message .
Any suggestions to directly display the panels(want to hide--> "search is waiting for input") "- -" without clicking/pressing enter on the textbox?
Below image depicts how i need my dashboard always without "search is waiting for input..."
Dashboard initial view without"search is waiting input"
@knanaiah001 if you need to show a custom panel/output when the text box is empty (on load or afterward), actual solution may differ based on how you are using the token in your SPL and how you are setting them. However, try the following run anywhere example where solution is based on rejects to display an empty html panel with -- as the output. You can use similar approach for your case.
PS: Based on the question asked, I am assuming you have a Submit button and there is no default option for the text box. I coded change event handler to unset the form token for the text box to ensure -- is displayed even when user manually clears the text box. Please try out and confirm!
<form>
<label>Text Box based Search</label>
<fieldset submitButton="true" autoRun="false">
<input type="text" token="logLevel" searchWhenChanged="false">
<label>Log Level</label>
<change>
<condition value="">
<unset token="form.logLevel"></unset>
</condition>
</change>
</input>
</fieldset>
<row>
<panel>
<title>Display Panel based on Text Box</title>
<table depends="$logLevel$">
<title>When the Search is Waiting for Input</title>
<search>
<query>| makeresults
| eval filterData="$logLevel$"</query>
</search>
</table>
<html rejects="$logLevel$">
<div style="font-weight:bold;text-align: center;">--</div>
</html>
</panel>
</row>
</form>
@niketn ,Thank you:)
But without submit button is it possible to set -- in panel when dashboard loads (empty text input)?
@knanaiah001 this should be available out of the box Documented feature of Simple XML dashboard.
Remove submit button by
submitButton="false"
And for the text box add
searchWhenChanged="true"
Following is the required change in the previous code.
<fieldset submitButton="false" autoRun="false">
<input type="text" token="logLevel" searchWhenChanged="true">
<label>Log Level</label>
<change>
<condition value="">
<unset token="form.logLevel"></unset>
</condition>
</change>
</input>
</fieldset>
If a search contains a token that is not defined then you will always get "Search is waiting for input" until that token is defined. AFAIK, there is no way to suppress that.
You can, however, hide the panel until the input is selected. Edit the source of your dashboard and add a depends clause to each panel.
<panel depends="$text token$">
...
Of course, you should replace "text token" with the name of your textbox input token.
Hi @richgalloway ,
Nope,I'am not supposed to hide the panels.
I had attached a image ,which shows my dashboard layout .
So whenever I refresh the dashboard,i need panels with "- -" display without even clicking on my input text box .