Splunk Search

Dashboard table styling?

szabados
Communicator

I want to adapt a script from the XML examples to a dashboard of mine.
When I add the script="" stylesheet="" line do the XML, it works, but after changing something in the *.js, by dashboard is broken:
The search can't run, the submit button gets inactive, and the Edit Panel, Edit source buttons disappear.

Any ideas ?

Tags (4)

aljohnson_splun
Splunk Employee
Splunk Employee

If you know that you changed something in the *.js, and it broke, just go backwards and find out which change broke the dashboard.

0 Karma

tmarlette
Motivator

that means your confusing the simple XML jscripts in the backend, or ignoring them all together. When the 'edit' buttons dissapear, splunk stops using those jscripts.

Honestly, I would assume the jscript is missing something and/or broken, however that's an assumption.

also, you should just have to 'share' the dashboard example apps knowledge objects in order to access things within, so make sure the permissions are set accordingly, otherwise your app won't be able to read the script.

szabados
Communicator

After installing the sample app, I tried to use the script from it, just for testing.
Added to the xml:
<dashboard script="simple_xml_examples:table_cell_highlighting.js" stylesheet="simple_xml_examples:table_cell_highlighting.css">

The issuse still persist.
The sample app is shared globally, with the read permissions for everyone

0 Karma

tmarlette
Motivator

Maybe try moving the desired script to:
/opt/splunk/etc/apps/<yourApp>/appserver/static?

I see you're using 'dashboard script'. The format that has worked for me on a simple xml dashboard is as follows:
<form script="yourScript1.js, yourScript2.js, yourScript3.js" stylesheet="yourStyleSheet1.css, yourStyleSheet2.css">

szabados
Communicator

For the first try, I've done that, but no luck

0 Karma

tmarlette
Motivator

when I added the .css file to my app itself, this began working. I was calling a single icon as opposed to the value.

I moved the .css file from it's locat (/opt/splunk/etc/app/simple_xml_reference/appserver/static) to my app:
(/opt/splunk/etc/apps/<myApp>/appserver/static)

Restart your search head after you do this, or wait (for awhile) until it takes, but your dashboard that is referencing this .css should work.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

How Edge Processor's Durable Queue Works

Edge Processor sits in one of the most consequential places in any Splunk pipeline: between your data sources ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Quantify Your Splunk Investment Impact: Introducing Savings Metrics to Value Insights

Building on the foundation established in our initial Value Insights releases, we are introducing the Savings ...