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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...