Dashboards & Visualizations

How to refresh on specific panel with other dashboard after click?

beginner1
Loves-to-Learn

Hi, currently i have left panel and right panel on my dashboard. Left panel is a list of Dashboard A,B and C links and right panel is main dashboard. Is it possible that I can click on let's say Dashboard B link from left panel and the right panel gets refresh and display the Dashboard B?

Appreciate if there is any code example that can share with me.

Thank you. 

Labels (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

For dashboard panels A, B, and C make them depend on their own tokens and then set the token in the drilldown depending on which "link" was clicked. You should also unset the other tokens.

<panel depends="$panelAtoken$">...</panel>
<panel depends="$panelBtoken$">...</panel>
<panel depends="$panelVtoken$">...</panel>
0 Karma

beginner1
Loves-to-Learn

Hi @ITWhisperer , thank you for the reply. 

Is there a way that i can open the link on same tab and refresh on right panel to display the dashboard after i click on any dashboard link from left panel?

i have quite a number of dashboard links on left panel for user to click. What i am trying to achieve is whenever user click on any of the dashboard links from left panel, then it will help to refresh on right panel on same tab and display the dashboard data.

Is it possible to achieve this?

0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

@beginner1 - You can try the below solution. I personally have not tried it. But this sounds interesting. 

You can use an HTML iframe. Something like this in your dashboard XML code.

<row>
  <panel>
    ... panel in which you are having links to dashboards ...
    ... when user clicks a link set a token (tkn_dashboard_url) with the URL in the value ...
    ... use relative URL, don't put search head IP in it so it can be reused ...
  </panel>
  <panel>
    <html>
      <iframe src="$tkn_dashboard_url$" title="Iframe for the dashboard on the right."></iframe>
    </html>
  </panel>
<row>

 

I've no idea how this will go but give it a try, logically I think it should work.

 

Hope this helps!!! Karma/upvote would be appreciated!!!

0 Karma

beginner1
Loves-to-Learn

Hi @VatsalJagani ,

Thank you for the suggestion. i guess iframe is the widget that i am looking for but i do not know how to pass the token from left panel link and refresh on right panel. Could you please guide me with more details?

Here is my current sample code:

 

<!--
# ========================================================
# Left Panel with dashboard links for user to click
# ========================================================
# -->
<div class="panel-heading">
<h1 class="panel-title c1">
<b>Dashboards Links</b>
</h1>
</div>
<div>
<ul class="list-group l1">
<li class="list-group-item">
<a href="https://LinkA" target="_blank">LinkA</a>
</li>
<li class="list-group-item">
<a href="https://LinkB" target="_blank">LinkB</a>
</li>
<li class="list-group-item">
<a href="https://LinkC" target="_blank">LinkC</a>
</li>
</ul>
</div>

<!--
# ========================================================
# Right panel with default field. I want to refresh right panel to display other dashboard after user click on any link from left panel. Is this possible?
# ========================================================
# -->
<panel id="RightPanel">
<input type="dropdown" token="date" searchWhenChanged="true">
<label>Testing</label>
<choice value="ALL">All</choice>
<choice value="TEST">Testing</choice>
<default>All</default>
</input>

 

0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

@beginner1 - To pass the token from the right panel you need to make use of the URL. 

Ex.

/en-US/app/<my-app>/second_dashboard?my_token=$my_token$form.my_token=$my_token$

(please take care of URL encodings as require)

- I would suggest setting both form.<token-name> and just <token-name>. (for safer side)

 

It cannot be synced the other way around. (from right side to left side panel) because of security restrictions of the HTML iframe component.

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 ...