Dashboards & Visualizations

Dashboard prebuilt panel not using JS/CSS from the dashboard

gabriel_vasseur
Contributor

I have things with IDs in my prebuilt panel, e.g.:

<input type="link" id="submit_button6">
<choice value="submit">Gabriel</choice>
</input>

 

And javascript and css loaded in my dashboard:

<form version="1.1" script="GV-Utils:submit_button.js" stylesheet="GV-Utils:submit_button.css">

The panel works when it's in the simple XML of the dashboard, with the CSS applied and the JS triggering actions when the button is clicked as designed, but if I put the panel verbatim in a prebuilt panel and reference it in the dashboard the CSS is not applied and the JS doesn't happen.

The reason I'd like that part of the dashboard in a prebuilt panel is so that users of my app (ES Choreographer | Splunkbase) can safely customise this part of the dashboard without touching the dashboard XML. If users touch the simple XML of the dashboard, it creates a "local" version of the whole dashboard which takes precedence over the "default" version and that for ever prevents this dashboard from being upgraded when the app is upgraded.

Any ideas?

Labels (4)
0 Karma
Get Updates on the Splunk Community!

Splunk MCP & Agentic AI: Machine Data Without Limits

  Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization ...

Finding Based Detections General Availability

Overview  We’ve come a long way, folks, but here in Enterprise Security 8.4 I’m happy to announce Finding ...

Get Your Hands Dirty (and Your Shoes Comfy): The Splunk Experience

Hands-On Learning and Technical Seminars  Sometimes, you just need to see the code. For those looking for a ...