Dashboards & Visualizations

Sending variables to a dashboard

vbumgarn
Path Finder

Is there any way to set a dashboard variable value via the url? It'd be nice to be able to do something like:

https://splunk4/en-US/app/myApp/myDashBoard?client=foo

And have the value of client available in the dashboard code as $client$.

Is there some way to accomplish this now?

Tags (1)

jbp4444
Path Finder

From Nick: "It's one of the significant things being worked on for the next big release"

So is this in 4.2 ??

0 Karma

richprescott
Path Finder

Releases are typically classified as major, minor and change. There are others, but I am guessing that Nick meant major version, which would be 5.0.

0 Karma

sideview
SplunkTrust
SplunkTrust

No Im afraid that we dont have anything like this in 4.1 nor in 4.0.

It's one of the significant things being worked on for the next big release.

If you are all of the following:

a) very familiar with Javascript in general
b) very familiar with Jquery in particular,
c) already in the advanced XML
d) willing to roll up your sleeves even further,

then you can sometimes workaround this limitation by putting a custom application.js file into your app and writing your own Javascript there.

Here's an example where I had a ServerSideInclude module on the page that would serve as a dynamic page title, and I write the value of a 'pageTitle' argument from the URL into that ServerSideInclude element.

$(function() {
    var qsDict = Splunk.util.queryStringToProp(document.location.search);
    if ("pageTitle" in qsDict) {
        $(".DM_pageTitle h1").text(qsDict["pageTitle"])
    }  
})

With some work you could use the same trick to do other things like set the selected state of a pulldown in a SearchSelectLister module.

Lowell
Super Champion

Pretty sure you couldn't do this in 4.0. I'm not sure about 4.1. I think this would be a great feature. +1

0 Karma
Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...