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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...