Dashboards & Visualizations

how to display time in panel from timerangepicker

madanashok
Path Finder

Hi,

Iam in need to display the time selected in timerange picker in the panel like html module.

How to get that.

Thanks,
Madan

Tags (1)

sideview
SplunkTrust
SplunkTrust

Assuming that you're using Sideview Utils app, and you're using the HTML module packaged with that app, you can just use these keys -

$search.timeRange.label$ - will print the human-readable timerange, like "in the last 24 hours", or "in January 2013"

eg:

<module name="HTML">
  <param name="html"><![CDATA[
    <h3>Showing results found $search.timeRange.label$</h3>
  ]]></param>
</module>

There are quite a few other keys you can use, and if you have a relatively recent copy of Sideview Utils (you can get the latest from the Sideview site, and it's free for internal use - http://sideviewapps.com/apps/sideview-utils ), then there's a full page of documentation just going through what keys are available where.

If you're not using Sideview Utils then you can use the ResultsHeader module. Although you can't control what the ResultsHeader module says and what it looks like, it will print out the timerange as a part of it's visible header. Or you can use the "SimpleResultsHeader" module within whose "headerFormat" param you can use the key $time$ to refer to the human-readable time range. Short version - if you're using Sideview Utils already it's way easier to use HTML module.

0 Karma

sideview
SplunkTrust
SplunkTrust

Possibly you're not inserting the SideviewUtils module on this view? If you use any Sideview module then you need to have the (invisible) SideviewUtils module somewhere on the page - usually tucked up next to the AppBar. That would do it. Also if the TimeRangePicker wasn't upstream from the HTML module but you say the SimpleResultsHeader module works, so at least SimpleResultsHeader is living downstream from the TimeRangePicker.

0 Karma

madanashok
Path Finder

By using SimpleResultsHeader module, I am getting the time range.

Thanks.

But while using $search.timeRange.label$ ,why it is not showing. Am i doing any mistake.

0 Karma

madanashok
Path Finder

I tried $search.timeRange.earliest$ and $search.timeRange.latest$ and now $search.timeRange.label$ in xml earlier.But , still i am not getting that in output.

I used TimeRangePicker Module and used sideview utils app also.

Please help me to find what could be the issue here.

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