Reporting

How can static text be added to all panels globally and show up in PDFs?

kevinking
Explorer

I have a requirement to add static text to panels, and would like the text to show up in printouts and PDFs too.
This text needs to be on all dashboard panels, so I'd like to set it globally, then the users don't need to think about it.
I know it's not recommended, but I was able to modify the dashboard template to add the text to panels. Almost achieved what I wanted, except for forms and PDFs. Forms I think I'll be able to fix, but PDFs look like a problem.

Advanced xml views will be suggested, but

  • that would mean every panel would need to be manually modified.
  • advanced xml is too complicated for many users.

I'm hoping there's a solution that will allow users to use simple xml views.

I would appreciate any suggestions,
Thanks,
Kevin

0 Karma

kevinking
Explorer

Managed to accomplish this by changing 8 files.
Header for all pages:

/opt/splunk/share/splunk/search_mrsparkle/modules/nav/AccountBar.html

Panels:

/opt/splunk/share/splunk/search_mrsparkle/templates/view/dashboard.html

Search app events, table and chart views

/opt/splunk/share/splunk/search_mrsparkle/modules/results/EventViewer.html
/opt/splunk/share/splunk/search_mrsparkle/modules/results/SimpleResultsTable.py
/opt/splunk/etc/apps/search/default/data/ui/views/flashtimeline.xml

PDFs:

/opt/splunk/lib/python2.7/site-packages/reportlab/lib/styles.py  (optional style)
/opt/splunk/lib/python2.7/site-packages/splunk/pdf/pdfrenderer.py
/opt/splunk/etc/system/bin/pdfgen_endpoint.py

And it will all have to be repeated following an upgrade....

0 Karma
Get Updates on the Splunk Community!

Build Scalable Security While Moving to Cloud - Guide From Clayton Homes

 Clayton Homes faced the increased challenge of strengthening their security posture as they went through ...

Mission Control | Explore the latest release of Splunk Mission Control (2.3)

We’re happy to announce the release of Mission Control 2.3 which includes several new and exciting features ...

Cloud Platform | Migrating your Splunk Cloud deployment to Python 3.7

Python 2.7, the last release of Python 2, reached End of Life back on January 1, 2020. As part of our larger ...