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!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...