Navigate programatically to dashboard

Hi!

I am currently writing a custom panel. In the panel there is a button that should navigate to another dashboard.

So I am looking for ways to solve this. For one, I don’t want to hard-code the URL of the dashboard, I want to enumerate all the dashboards, decide which dash to use and then proceed to get the url from for that dash somehow. Is that possible?

Next is the question of how I would actually navigate there. Is there a correct way to do this without simply doing window.location=url?

So to summarize:

  1. How to enumerate dash from code
  2. How to get url of dash from code
  3. How to navigate to selected dashboard

Thanks!

I’ve never done this but I’m pretty sure it’s possible. Here’s some ideas for you.

Look at the code of the Graph panel drilldown feature. Then look at the code of the Dashboard list panel. You could do a search by Dashboard name or Tag like the Dashboard list does. Also look at the code used to show the drilldown menu to get an idea of how it works and make something similar with a button instead.