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!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...