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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...