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
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...