Splunk Dev

How to reset dashboard when I press submit? (or send using HTTP POST)

agentsofshield
Path Finder

I have a Splunk dashboard that sends data as variables to a script.

I don't want the script to run every time they refresh the page or go back a page. What should I do?

Is there a way to "submit" the form using HTTP POST so that the results won't appear in the URL?

Is there a way to run the search AND refresh the page at the same time while pressing "submit"?

Or is there an easy way to do it using JavaScript?

Example of what I have:

<form>
    <label>Capture Packets</label>
    <fieldset submitButton="True">
        <input type="text" token="host">
            <label>Host</label>
        </input>
        <input type="dropdown" token="runtime">
            <choice value="30">30 Seconds</choice>
            <choice value="60">1 Minute</choice>
            <choice value="120">2 Minutes</choice>
        </input>
    </fieldset>
    <row>
        <panel>
            <title>Run Script</title>
            <table>
                <search>
                    <query>| script capture $host$ $runtime$</query>
                </search>
                <option name="refresh.display">progressbar</option>
            </table>
        </panel>
    </row>
</form>
Labels (3)

kmorris_splunk
Splunk Employee
Splunk Employee

agentsofshield
Path Finder

This is a cool answer that helps a little, BUT the results are still in the URL.

This means that if I refresh the page, it repeats the action again and I don't want it to.

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...