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

Canvas: Allow for canvas elements to directly open data links #79698

Open
zs-dima opened this issue Dec 19, 2023 · 4 comments
Open

Canvas: Allow for canvas elements to directly open data links #79698

zs-dima opened this issue Dec 19, 2023 · 4 comments
Assignees
Labels
area/panel/canvas Issues related to canvas panel type/feature-request
Milestone

Comments

@zs-dima
Copy link

zs-dima commented Dec 19, 2023

Could be nice to add an option to make Canvas panel clickable to be able turn them into beatiful buttons and tiles with extra information.
Curretly it is no option to assign URL to open on panel click.
Panel links and Data links displayed in tooltips only and can not be used in this case.

image

image

@gelicia
Copy link
Contributor

gelicia commented Dec 19, 2023

I chatted with @zs-dima about this - the request is an option where clicking the element would go directly to the link in question, skipping the tooltip. The example shown at https://play.grafana.org/d/canvas-examples/panel-tests-canvas-examples?orgId=1 is close but the current flow where it clicks to open the tool tip to select the link isn't as straightforward as they'd like.

@gelicia gelicia added type/feature-request area/panel/canvas Issues related to canvas panel labels Dec 19, 2023
@zs-dima
Copy link
Author

zs-dima commented Dec 19, 2023

@gelicia thanks a lot for the details.

In addition it would be nice to make not only metric-value elements clickable, but also the Panel itselt.
(or at least to a Rectangle element without a linked field, to be able to put transparent one over the panel as a workarround).
image

Maybe Button can have option to open URL as well.

Currently it looks a bit strange to press button to open tooltip to press item to open URL...

@GCIotron
Copy link

GCIotron commented Jan 9, 2024

Hello!
We're also interested in the requested feature, in particulary we like to have DataLink defined by canvas's elements (so each element can have it's owns DataLinks) and the canvas's element should be clickable to navigate (skipping the popup) to the DataLink when there is only one DataLink defined for that elment.
I also think that would be useful to show a popup when there are more the one DataLink defined for a canvas's element in order to let the user to choose one of them.

Now we are using the "Stat" panel which do the things well so when there is one DataLink defined, the panel is clickable and the link is opened skipping any popup.

@nmarrs nmarrs changed the title clickable Canvas panel Canvas: Allow for canvas elements to directly open data links Apr 1, 2024
@nmarrs nmarrs self-assigned this Apr 1, 2024
@nmarrs nmarrs added this to the 11.0.x milestone Apr 1, 2024
@nmarrs
Copy link
Contributor

nmarrs commented Apr 1, 2024

Hey @zs-dima - thanks for raising up this issue - I think these two PRs (expanding data link support vastly + one click access mode) get us a little closer to this reality (with a current work around now being adding a phantom data link to a "hidden" property such as background image that will make the element able to include a link)

In this way for your original request you could simply add a transparent rectangle that has its background property tied to a dummy data value and be able to configure clicking on said element bounds to wherever you like achieving the affect you are after.

Screen.Recording.2024-04-01.at.1.03.53.AM.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/panel/canvas Issues related to canvas panel type/feature-request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants