Splunk Search

Running jQuery on search results

big_nuggets
Explorer

Hi,
Hoping someone here can help because I've been running into walls on it.
I'm trying to insert a link on every tr element returned in search results. Searching around here it appears I need to edit a .js file somewhere in this directory /opt/splunk/share/splunk/search_mrsparkle/exposed, more accurately directories therein.

However, I've tried modifying EVERYTHING I could think of with a simple alert("hi");, then ./bin/splunk restart splunkweb, get a message that webservices have been restarted and nothing. Using Chrome Incognito so I know it's not a caching issue. I'm doing this on Splunk 7.3.0. Any help would be appreciated thank you!

I really don't want to make my own app, I'd much rather just inject some JS into the default mrsparkle search. alt text

0 Karma

big_nuggets
Explorer

Not the most elegant way, but I've found a solution putting my jQuery in /opt/splunk/share/splunk/search_mrsparkle/templates/pages/base.html right before works.

0 Karma
Get Updates on the Splunk Community!

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...