Dashboards & Visualizations

FireBug, FireFile and custom CSS

guilhem
Contributor

Hello,

I'm trying to put some custom CSS into my splunk application. Until now I have managed to create the application.css file inside the appserver/static folder.

I can add stuff inside the CSS file, but I really don't like using vi/vim to save the file. So I am using firebug to inspect and modify my css on the fly, save it locally and then upload it to the server, but it takes time.

Finally I installed the firefile extension for firebug, to upload directly CSS changes to the server (installation instruction can be found here).

Problem is: I can't find the right place to put the firefile.php file inside the server and acces it to perform the required validation to add the site to the authorized firefile server.

My question is: Is it possible to set up firefile with splunk? If it's not, how do you do to edit and save painlessly your custom application.css?

Thanks!!

Tags (3)
0 Karma
1 Solution

richcollier
Path Finder

splunkweb is a python based webserver (CherryPy) and does not natively support PHP

View solution in original post

guilhem
Contributor

I finally decided to edit the CSS using VIM, as the other solutions takes too much time (considering my very basic knowledge in web development)

I'm so sad.

Thanks for the insightful answers.

0 Karma

richcollier
Path Finder

splunkweb is a python based webserver (CherryPy) and does not natively support PHP

jonuwz
Influencer

Could you not throw up a php server with a stub page that loads a symbolic link to the application.css ?

You'd be able to tweak the css in the window that loaded the stub, then refresh the splunk page to see if it worked.

0 Karma

richcollier
Path Finder

I must chuckle that you say you're adverse to using vi but are willing to put the effort into migrating php code to python? 😉

0 Karma

guilhem
Contributor

Thanks for the insights, I will do it manually as it seems that there is no way to automate the process. I will try to develop an app for it though when I have a little time.

0 Karma

MHibbin
Influencer

You could probably use a python script that runs from start-up (via inputs, but with NO printing to STDOUT, otherwise you will affect your license limit) and checks takes data out of the PHP file and put it into an application.css file, although this seems a bit "excessive".

0 Karma

guilhem
Contributor

OK, that seems clear ^^. But what if I manage to translate the php code into python, is there a way to make it work?

0 Karma

MHibbin
Influencer

Don't believe this is possible to interact with Splunk in this way.

Does FireFile not support CSS output? - Bit odd to allow CSS changes, but not output in the standard file format.

If you don't like using Vi(m) - although it is a powerful tool and good fun - typically people use tools like Nano on Nix systems. This is a bit more use friendly and easier to use.

You could alway write create/modify the CSS into a text editor and the "Copy and Paste" into your server-side CSS file.

If you have a blank application.css file you could just open in it vi, having copied the text to your clipboard, and the press "i" to insert, and then right-click paste (or an alternative, that most terminals/prompts will allow).

Probably not the answer you are looking for, just some food for thought.

MHibbin
Influencer

@richcollier, definately if we are talking about the file transfer method... loads of ways to achieve that. I was just thinking on the level of pure simplicity... nothing quicker than ol' "Copy and Paste" 😉 Hah!

0 Karma

richcollier
Path Finder

Perhaps something easier would be to set up something like Cyberduck to SFTP the locally edited file over to the splunk server with a simple drag-n-drop.

0 Karma

MHibbin
Influencer

Not sure I can help you there 🙂

Perhaps you could create an App to interact with the tool, and release to SplunkBase users.

0 Karma

guilhem
Contributor

Thanks! I was guessing that I will have to do it this way (performing all the modification locally, and then paste it somehow server side...)

I don't know why it still has to be done this way when there is such powerfull tools out there.

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...