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!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...