- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to make JavaScript applicable to all dashboards?

cuongnguyen112
Engager
02-28-2022
06:52 AM
Hi, I have a javascript file and I want it to be applicable to all dashboards
Are there any way to do that but not copy and paste the reference to each html file ?
Thanks.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

kamlesh_vaghela

SplunkTrust
03-01-2022
07:55 PM
You can use dashboard.js to apply common logic in all dashboard.
`dashboard.js` is internally executed by The Splunk web when any dashboard gets loaded.
You can create dashboard.js in YOUR_APP/appserver/static folder and open any dashboard in that app.
require([
'underscore',
'splunkjs/mvc',
'splunkjs/mvc/simplexml/ready!'
], function(_, mvc) {
console.log("Kamlesh")
});
I hope this will help you to move you on 🙂 .
KV
