I'm trying to add custom Javascript to my simple XML dashboard (as explained here) but when it start running it throw an exception "Splunk is not defined".
This is my js code with some modification to find why its not running:
try{
if( Splunk.Module.SimpleResultsTable ){
Splunk.Module.SimpleResultsTable = $.klass(Splunk.Module.SimpleResultsTable, {
renderResults: function($super, htmlFragment) {
$super(htmlFragment);
if (this.getInferredEntityName()=="events") {
this.renderedCount = $("tr", this.container).length - 1;
}
$('#highlight td').each(function() {
$(this).attr("data-value",$(this).html().trim());
});
}
});
}
}
catch(err){
alert(err.message);
}
what am i doing wrong?
... View more