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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...