Dashboards & Visualizations

Dashboard Studio | How do I encode inputs into the URL of a dashboard?

jprior
Explorer

When the page gets reloaded for my Dashboard Studio dashboard all of the inputs get reset. I have to enter all the inputs again which is disruptive to my workflow.

This is particularlly annoying in two use cases:

1. When I reboot my machine chrome remembers my tabs but it causes the page to reload. So after a reboot I have to enter all the inputs again.

2. When the SSO times out at my company it causes a login page to load, then after auth it navigates back to the dashboard. This is annoying because it can happen any time of the day.

Is there a solution for this? Can I encode the input values into the URL for the dashboard so it will automatically load with the correct values even if the page is reloaded?

 

Here is the source for my inputs

{
    "type": "input.timerange",
    "options": {
        "token": "global_time",
        "defaultValue": "-24h@h,now"
    },
    "title": "Time Range"
}

{
    "options": {
        "items": [
            {
                "label": "All",
                "value": "US, CA, GB"
            },
            {
                "label": "US",
                "value": "US"
            },
            {
                "label": "CA",
                "value": "CA"
            },
            {
                "label": "GB",
                "value": "GB"
            }
        ],
        "defaultValue": "US, CA, GB",
        "token": "selectedRegion"
    },
    "title": "Region",
    "type": "input.dropdown"
}

{
    "options": {
        "items": [
            {
                "label": "Unique Companies",
                "value": "realms"
            },
            {
                "label": "Percentage of Total Traffic",
                "value": "percentage"
            }
        ],
        "defaultValue": "realms",
        "token": "selectedMode"
    },
    "title": "Mode",
    "type": "input.dropdown"
}

 

Labels (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You can define initial values as well as default values (at least you can in Classic dashboards) - the other way is to pass them as parameter on the URL e.g. &form.input1=abc

0 Karma

jprior
Explorer

What would be the specific encoding to pass the options on the URL for my case? Let's say I want to set the Region selector to "GB"?

For that select here is the critical information:

  • Title: Region
  • Token Name: selectedRegion
  • Input ID: input_npJ29MjX

None of these random guesses worked for me:

  • ?form.Region=GB
  • ?form.selectedRegion=GB
  • ?form.input_npJ29MjX=GB
  • ?form.input_npJ29MjX.value=GB
  • ?form.input_npJ29MjX.selected=GB
  • ?Region=GB
  • ?selectedRegion=GB
  • ?input_npJ29MjX=GB
  • ?input_npJ29MjX.value=GB
  • ?input_npJ29MjX.selected=GB
  • ?form.Region="GB"
  • ?form.selectedRegion="GB"
  • ?form.input_npJ29MjX="GB"
  • ?form.input_npJ29MjX.value="GB"
  • ?form.input_npJ29MjX.selected="GB"
  • ?Region="GB"
  • ?selectedRegion="GB"
  • ?input_npJ29MjX="GB"
  • ?input_npJ29MjX.value="GB"
  • ?input_npJ29MjX.selected="GB"
  • ?form.Region=3
  • ?form.selectedRegion=3
  • ?form.input_npJ29MjX=3
  • ?form.input_npJ29MjX.value=3
  • ?form.input_npJ29MjX.selected=3
  • ?Region=3
  • ?selectedRegion=3
  • ?input_npJ29MjX=3
  • ?input_npJ29MjX.value=3
  • ?input_npJ29MjX.selected=3
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

This works for me

?form.selectedRegion=GB

Which version of Splunk are you using?

0 Karma

jprior
Explorer

Does that work for you on a Dashboard Studio dashboard?

We have version 8.2.7.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Yes, Dashboard Studio but I am on 9.1.0.1

0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...