Splunk Dev

Help me in resetting token with button click for a couple of token on dashboard

DataOrg
Builder

Please help me in resetting token value to "*" on the couple of token from button click.

 

 

<html>
          <center>
            <div>
          <button id="buttonId" class="btn btn-primary">Reset</button>
        </div>
          </center>
        </html>
require([
        'jquery',
        'splunkjs/mvc',
        'splunkjs/mvc/simplexml/ready!'
    ], function ($, mvc) {
    var tokens = mvc.Components.get("default");
    $('#buttonId').on("click", function (e){
       tokens.set("SELECTED_PU", "*");
		tokens.set("SELECTED_PL", "*"); 
    });
});

 

Labels (1)
Tags (3)
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 ...