So far, this is one of the only ways i've figured out how to change the onclick of the trellis single value view so that the entire block is clickable (like in ITSI) on the dashboard, i create a single value search, with trellis view, and colors inverted so the entire square shows the color status, AND finally I added script="mycode.js" to the form tag, and id="main" to it's search tag in the xml: <form theme="dark" script="mycode.js"> <search id="main"> I also added styling to force the labels down into the blocks: <panel> <html> <p/> <style> .facet-label {top:30% !important;} .facet-label {z-index:1 !important;} .facet-label {font-size:20px !important;} .facet-label {font-size:1.125vw !important;} .facet-label {display:inline !important;} text.single-result {z-index:1 !important;} </style> </html> </panel> Then i placed the js here: /opt/splunk/etc/apps/search/appserver/static/mycode.js mycode.js: require(['splunkjs/mvc','splunkjs/mvc/simplexml/ready!','splunkjs/ready!'], function(mvc){ var main = mvc.Components.get('main'); main.on("search:progress", function() { $('.svg-container').on("click", function (e) { $($('a.single-drilldown', $(e.currentTarget))[0]).click(); }); }); main.on("change", function() { $('.svg-container').on("click", function (e) { $($('a.single-drilldown', $(e.currentTarget))[0]).click(); }); }); main.on("data", function() { $('.svg-container').on("click", function (e) { $($('a.single-drilldown', $(e.currentTarget))[0]).click(); }); }); }); Final result: (each block is clickable and leads to the intended drilldown) Now, the question is... why cant I just cram in the JS like below: $('.svg-container').on("click", function (e) { $($('a.single-drilldown', $(e.currentTarget))[0]).click(); }); why am i being forced to use mvc at all?
... View more