Dashboards & Visualizations

Providing relative Path to a js or css files in a dashboard

nabeel652
Builder

I'm using Splunk Cloud so cannot upload css and js files as a self service thing. 
When I use 

<dashboard version="1.1" script="table_icons_inline.js" stylesheet="table_decorations.css">


from within the Dashboard Examples app (simple_xml_examples) it works fine.

My question is that I want to use those js and css files from Dashboard Example apps in other apps too. I believe there should be some way to add those files providing relative paths. Like:

<dashboard version="1.1" script="apps/simple_xml_examples/appserver/static/table_icons_inline.js" stylesheet="apps/simple_xml_examples/appserver/static/table_decorations.css">


Any ideas??

Labels (4)
0 Karma
1 Solution

bowesmana
SplunkTrust
SplunkTrust

You just use 

<dashboard version="1.1" script="simple_xml_examples:table_icons_inline.js">

It definitely works for script - I've never used it with css, but I assume that will work too.

NB: If you are on Victoria Cloud, you can upload your own apps containing JS and CSS, as long as they have gone through the appinspect process.

View solution in original post

0 Karma

bowesmana
SplunkTrust
SplunkTrust

You just use 

<dashboard version="1.1" script="simple_xml_examples:table_icons_inline.js">

It definitely works for script - I've never used it with css, but I assume that will work too.

NB: If you are on Victoria Cloud, you can upload your own apps containing JS and CSS, as long as they have gone through the appinspect process.

0 Karma

nabeel652
Builder

Thanks. That worked 🙂

0 Karma
Get Updates on the Splunk Community!

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

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