Dashboards & Visualizations

How to get Dashboard Submit and Stop Button?

zacksoft_wf
Contributor

I have a dashboard with around 10 panels in it. There are two filters (input)  on top of my dashboard. 'Index' and 'Source'. The 'Index' dropdown populates all the indices and then the corresponding sources are populated in the 'Source' dropdown input. Based on these selection the 10 panels are loaded.

Current Scenario : Right now, when anyone opens the dashboard, the 'Index' and 'Source' dropdown values defaults to value "ALL"  and all the panels immediately start to load.

What I need help with
1.  I need a "Submit" button in my dashboard. So that when the dashboard is opened, it shouldn't automatically start loading the panels. It should wait until the user presses the "Submit" button. Sometimes user may want to change the value from ALL to other values.  In that case also, (after user changes the input), the dashboard still should wait until "Submit" is pressed to start the searching with the new filter.  What code I have to write in the backend XML to achieve this.

2. Also, is it possible to have another button, say "Stop", and when pressed it should stop loading of the dashboard. 

Labels (2)
Tags (1)
0 Karma
1 Solution

venkatasri
SplunkTrust
SplunkTrust

token=field1 is sample you cna ignore it doesn't actually link to Submit button.

If Search On change is unchecked in UI mode that should be fine, in you code input token=index

Are you using this index in panels  SPL? can you paste your whole dashboard code?

 

View solution in original post

0 Karma

zacksoft_wf
Contributor

I see "search on change" is already unchecked for my two inputs. 
Then I created a "Submit" button from "Add Input" option.  
Where do I add the code you had replied earlier in the XML ? Is it in here ?
<fieldset submitButton="true" autoRun="false">
<input type="dropdown" token="index">
<label>Index</label>
<choice value="*">ALL</choice>
<prefix>index=</prefix>
<fieldForLabel>index</fieldForLabel>
<fieldForValue>index</fieldForValue>


Also the  "field1"  token name you specified, How do I define it? In the "Submit" button in UI, there is no pencil/edit button showing to define this token ,

0 Karma

venkatasri
SplunkTrust
SplunkTrust

token=field1 is sample you cna ignore it doesn't actually link to Submit button.

If Search On change is unchecked in UI mode that should be fine, in you code input token=index

Are you using this index in panels  SPL? can you paste your whole dashboard code?

 

0 Karma

zacksoft_wf
Contributor




The solution you provided is working , Thank you.

0 Karma

venkatasri
SplunkTrust
SplunkTrust

@zacksoft_wf 

1. In Simple xml Dashboards in UI mode you have to uncheck 'Search on Change' for all the inputs. Source  looks like as below. Add submit button so that dashboard will not load untill you have selected all the inputs/click submit.

    <input type="text" token="field1" searchWhenChanged="false">

2. There is no stop button feature that you can control out-of-the box.

--

Hope it helps!

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...