All Apps and Add-ons

Set-Unset token in Drilldown Visualisation

sarvesh_11
Communicator

Hi Splunkers,
I have donut visualisation in my dashboard (screenshot attached).
Since we do not have drilldown functionality inbuilt in https://splunkbase.splunk.com/app/3238/
I have written js for click events on donut slice.
I have tried with submitted, unsubmitted logic, used set and unset logic too, but doesnt seems to resolve my issue.
here is my js:

require(["splunkjs/mvc",
"jquery",
"splunkjs/ready!",
"splunkjs/mvc/simplexml/ready!"
], function( mvc,
$){
var defaultTokenModel=mvc.Components.get("default");
var submittedTokenModel=mvc.Components.get("submitted");

      $(document).on("click","#payment_css g.c3-chart-arc.c3-target-Warning",function(){
         defaultTokenModel.set("color","Warning");
         submittedTokenModel.set("color","Warning");
         defaultTokenModel.set("alert","mobile");
         submittedTokenModel.set("alert","mobile");
      });

      $(document).on("click","#payment_css g.c3-chart-arc.c3-target-Critical",function(){
         defaultTokenModel.set("color","Critical");
         submittedTokenModel.set("color","Critical");
         defaultTokenModel.set("alert","mobile");
         submittedTokenModel.set("alert","mobile");
      });

$(document).on("click","#payment_css g.c3-chart-arc.c3-target-Normal",function(){
defaultTokenModel.set("color","Normal");
submittedTokenModel.set("color","Normal");
defaultTokenModel.set("alert","mobile");
submittedTokenModel.set("alert","mobile");
});

$(document).on("click","#freedisk_css g.c3-chart-arc.c3-target-Warning",function(){
defaultTokenModel.set("color","Warning");
submittedTokenModel.set("color","Warning");
defaultTokenModel.set("alert","freedisk");
submittedTokenModel.set("alert","freedisk");
});

      $(document).on("click","#freedisk_css g.c3-chart-arc.c3-target-Critical",function(){
         defaultTokenModel.set("color","Critical");
         submittedTokenModel.set("color","Critical");
         defaultTokenModel.set("alert","freedisk");
         submittedTokenModel.set("alert","freedisk");
      });

      $(document).on("click","#freedisk_css g.c3-chart-arc.c3-target-Normal",function(){
         defaultTokenModel.set("color","Normal");
         submittedTokenModel.set("color","Normal");
         defaultTokenModel.set("alert","freedisk");
         submittedTokenModel.set("alert","freedisk");
      });

});

in above js, token: alert is my panel dependent and token color is donut slice dependent.
Issue is : i have different table for both of these alert i,e Mobile and freedisk , in my xml i have given
if i click on Mobile Panel, the table for freedisk also appears with message "No Result Found", and viceversa.

What i want is, on the basis of click, i want to toggle between the tables.

0 Karma
Get Updates on the Splunk Community!

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had 3 releases of new security content via the Enterprise Security ...

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...