Dashboards & Visualizations

Can we use our own costume javascript except form setup.xml?

amolp07
New Member

I want to use my own written java script except form setup.xml in Technology Add-on(Moduler Input).
I want to update setup.xml dynamically.
Is this possible?
please late me know if is there any way to achieve this? or alternative way

Thanks in advance.

0 Karma
1 Solution

kamlesh_vaghela
SplunkTrust
SplunkTrust

@amolp07

You can create YOUR_APP/appserver/static/application.js and write your logic in this file. But you have to take care in your javascript logic development style.

application.js is automatically called in setup.xml so no need to include. But as there is auto-inclusion of application.js we have to take care that your logic in javascript, like executing code only if some element found on page load. Just try and let me know if any issue.

Thanks

View solution in original post

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@amolp07

You can create YOUR_APP/appserver/static/application.js and write your logic in this file. But you have to take care in your javascript logic development style.

application.js is automatically called in setup.xml so no need to include. But as there is auto-inclusion of application.js we have to take care that your logic in javascript, like executing code only if some element found on page load. Just try and let me know if any issue.

Thanks

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 ...