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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...