Dashboards & Visualizations

How to insert text in an HTML panel based on user input in text forms without showing the name of the tokens on the dashboard?

guillecasco
Path Finder

I have this simple HTML panel as a title of a chart. This chart shows some values depending on the tokens that are referred in some text box on the top of the dashboard. By default, when you access the dashboard in the html panel chart title you have:

Events  for  $Client_Version|s$ and Asset ID $id|s$

Thing is I don't want to show the name of the tokens when someone accesses the dashboard. I would like to have:

Events for:       

and then, depending on the values that a user enters in both text boxes, the value of that title should be changed with those values. It is working fine now, so if you enter something in the text boxes, the HTML panel changes to: text1: A text2: B

Events for: A and B 

but when you access the dashboard for the first time, by default it has the token's name which I think no one should see.
I tried with value, but I'm getting something like:

Events  for:  $Client_Version|s$ and Asset ID $id|s$  Events for: 

Events for appears two times: in title and in the default value that I put.

How can I solve this?
thanks

            <h1>

              Events  for:  $Client_Version|s$ and Asset ID $id|s$

            </h1>
        </html>
0 Karma
1 Solution

sundareshr
Legend

Not sure there is a way to do this without writing script or hiding the panel till the token is set. My recommendation would be to add `depends="$tokenname$" to your panel tag so the entire panel stays hidden till the token value is set. If you must show the chart panel, but are OK with hiding the title, you could add a HTML panel about the chart panel and hide that till token is set.

http://docs.splunk.com/Documentation/Splunk/6.4.1/Viz/PanelreferenceforSimplifiedXML#panel

View solution in original post

sundareshr
Legend

Not sure there is a way to do this without writing script or hiding the panel till the token is set. My recommendation would be to add `depends="$tokenname$" to your panel tag so the entire panel stays hidden till the token value is set. If you must show the chart panel, but are OK with hiding the title, you could add a HTML panel about the chart panel and hide that till token is set.

http://docs.splunk.com/Documentation/Splunk/6.4.1/Viz/PanelreferenceforSimplifiedXML#panel

guillecasco
Path Finder

that´s a better idea. I will just hide it till values are entered. thanks

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...