Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for adding data links for the tree panel items #22

Closed
smipi1 opened this issue Feb 13, 2024 · 5 comments · Fixed by #25
Closed

Add support for adding data links for the tree panel items #22

smipi1 opened this issue Feb 13, 2024 · 5 comments · Fixed by #25
Assignees
Labels
enhancement New feature or request

Comments

@smipi1
Copy link

smipi1 commented Feb 13, 2024

The native Grafana panels allow Data links to be configured. Adding a data link allows the user to drill through on data points, numbers and labels by clicking on them. Having support for this in the tree panel makes for a very natural and useful extension.

The mechanism for the native Grafana panels are quite elaborate and flexible, but it would be adequate to add an optional Node data link field name under the Interactive tree panel options. If this field name is set, the node element text gets surrounded with an <href> that points to what is specified.

@BrightGrafana BrightGrafana added the enhancement New feature or request label Feb 14, 2024
@BrightGrafana
Copy link
Owner

Thank you for bringing up the idea of adding support for data links in the tree panel. This would be a useful and natural extension to the existing functionality. The suggestion of adding an optional Node data link field name under the Interactive tree panel options seems like a practical solution. This would allow users to navigate away from the dashboard based on the link.

The best way this would work is if the tree has a option to not contract when clicking on labels. #11 and #12

@BrightGrafana
Copy link
Owner

@smipi1 Would the configuration below work?
image

@smipi1
Copy link
Author

smipi1 commented Feb 19, 2024

Yes! That would be perfect!

@BrightGrafana
Copy link
Owner

released in 1.4.0

@smipi1
Copy link
Author

smipi1 commented Feb 26, 2024

Hi @BrightGrafana ,

I updated to 1.4.0. The Panel options turned out a little different, but it does exactly what I needed it to do! Highly appreciated improvement!

For casual readers, there isn't any proper documentation on how to configure this yet, so I will document it here:

  1. Edit the panel options.
  2. Under Interactive Tree Panel, set the Click mode to Data link.
  3. Under Data Link, set the Data link URL. You would usually leverage a data field from your data query here.
  4. Optionally select Open in new tab.

Tree-panel-data-link-options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants