All Apps and Add-ons

How to pass on the selected timerange in TimeRangePicker on a drilldown?

imrago
Contributor

I have a Timerangepicker on both the originating and the target dashboards, and I use the Redirector/URLLoader modules from the SideView app to pass on parameters between the dashboard.

How could I pass on the the selected timerange from the originating dashboard to the TimeRangepicker module on the target dashboards?

1 Solution

sideview
SplunkTrust
SplunkTrust

You refer to the earliest time as $search.timeRange.earliest$ and the latest as $search.timeRange.latest$, so your Redirector should look like this:

<module name="Redirector">
  <param name="url">my_view</param>
  <param name="arg.user">$username$</param>
  <param name="arg.earliest">$search.timeRange.earliest$</param>
  <param name="arg.latest">$search.timeRange.latest$</param>
</module>

If you're using the 'template' param on your Pulldown or TextField, you'll want to use:

<param name="arg.user">$username.rawValue$</param>

instead of just $username$ -- when values are templated, $username$ will be user="bob", and to get the raw value bob, you have to use $username.rawValue$.

I'll add an example to the documentation that includes timeranges in the Redirector and a TimeRangePicker in the target view. Didnt notice the omission until now. Thanks.

View solution in original post

sideview
SplunkTrust
SplunkTrust

You refer to the earliest time as $search.timeRange.earliest$ and the latest as $search.timeRange.latest$, so your Redirector should look like this:

<module name="Redirector">
  <param name="url">my_view</param>
  <param name="arg.user">$username$</param>
  <param name="arg.earliest">$search.timeRange.earliest$</param>
  <param name="arg.latest">$search.timeRange.latest$</param>
</module>

If you're using the 'template' param on your Pulldown or TextField, you'll want to use:

<param name="arg.user">$username.rawValue$</param>

instead of just $username$ -- when values are templated, $username$ will be user="bob", and to get the raw value bob, you have to use $username.rawValue$.

I'll add an example to the documentation that includes timeranges in the Redirector and a TimeRangePicker in the target view. Didnt notice the omission until now. Thanks.

Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...