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!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...