Splunk Search

Add a clock to the header

hartfoml
Motivator

Anyone have a suggestion on how I can add a digital clock or even a world clock to the header in the default view for my APP?

Tags (2)
0 Karma

jhupka
Path Finder

One way is via a simple javascript clock widget.

Within your app you can have a javascript file that gets included with your views when rendered. This is placed in the appserver/static/application.js file (it has to be that name/location) of your app.

For a simple clock example, try adding the javascript from here:

http://www.w3schools.com/js/tryit.asp?filename=tryjs_timing_clock

Then, you'll need to include the HTML portion from the W3 sample (i.e. the div tag) in your view somehow - via Sideview's HTMLModule or one of the other mechanisms to add raw HTML to your view.

0 Karma

hartfoml
Motivator

this is probably the right answer and thanks for the help.

I guess this is just a little out of my reach.
I don't know how to create the .js widget from the code sample. Is the .js just a text readable file with the .js extension?

Also I need the numbers to be color "white" since the clock is on a black background and I need them to be a larger font.

Please forgive me I'm learning here.
Thanks again for your help.

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 ...