Dalvany / dalvany-image-panel

Image panel for Grafana
MIT License
16 stars 3 forks source link

Url tag is embedded into image optionally #33

Closed ivanshilo closed 2 years ago

ivanshilo commented 3 years ago

It would be usefull to be able to click onto the image and open the image url in the new tab, for example to see the image in a full size.

Dalvany commented 3 years ago

Hello @ivanshilo, thank you for using this plugin and reporting this request. Can you tell me what version of the plugin you're using and can you tell if the contextual menu works ? I think if it's 2.2.0 or 2.2.1 #15 bug might prevent you from right clicking on the image to open the enu (I never tried with that version). It will be fixed in the next version, I just tested with this pre-release that you can open the image in new tab from contextual menu.

ivanshilo commented 3 years ago

It is working indeed in 2.3.0. Thanks! For mobile devices right click is not available, thats why I said that click on the image itself would be opening it in a new tab (optionaly). But for non-mobile platforms right-click is more than enough of course. Thanks for a great plugin!

Dalvany commented 3 years ago

Hello, I don't know what mobile os and what browser your using, but with firefox on Android, a "long click" on the image brings up a context menu, allowing to open image in new tab. I think it won't work with version 2.2.0 and 2.2.1 though, because of #15 bug but should be fine with next version.

ivanshilo commented 3 years ago

Long click is not exactly what we wanted to have. We have changed your code a bit wrapping img tag with a' href' tag using the same url and got required behavior.

Dalvany commented 3 years ago

Ok, I'm not sure I understand what's wrong with mobile. I'll probably do something later anyway, could be useful to open an arbitrary URL.

Dalvany commented 3 years ago

@ivanshilo I added the feature, can you try this pre-release ? There's a new Link section in the panel configuration where you can construct the link URL.

ivanshilo commented 3 years ago

Hi! I cannot test it since in Grafana version 8.1 your plugin is blocked because of "modified signature". Better create it without signature at all, this can be then overcomed.

On Wed, Oct 13, 2021 at 6:14 PM Dalvany @.***> wrote:

@ivanshilo https://github.com/ivanshilo I added the feature, can you try this pre-release https://github.com/Dalvany/dalvany-image-panel/releases/tag/v2.4.0 ? There's a new Link section in the panel configuration where you can construct the link URL.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Dalvany/dalvany-image-panel/issues/33#issuecomment-942464552, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEMOGC6T34YRT7ES7JAQNLLUGWV6HANCNFSM47D6LDWQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Dalvany commented 3 years ago

Hello, sorry this late answer, I'll remove the file that contains the signatures.

Dalvany commented 3 years ago

@ivanshilo , I removed the MANIFEST file that contains the signature, let me know if it doesn't help.

Dalvany commented 2 years ago

I'll publish the release on grafana.

ivanshilo commented 2 years ago

Release 2.4.0 was tested and it is working good. Feature of automatic image opening working good. I like less that I have to enter URL parameters twice. I understand the idea that maybe by clicking on the image, another image in bigger resolution can be requested but by default it is not the case. It could be solved by adding another toggle control that uses "default" URL settings or allows to override. Another moment - optional text under images is left aligned. It should be central aligned to my taste. I cannot fix it by adding whitespaces in the field value, your code removes whitespaces. I wanted to show the time under the image but you do not allow to choose timestamp field, not sure based on which criteria. I had to add my own timestamp field as a "human readable" string field in Grafana SQL request and then use it in your widget. Anyway, thx for you work!

Dalvany commented 2 years ago

Hello @ivanshilo , thank you for the update. I'll probably stick for the moment with the current default settings for the URL, I find more likely to open something else than the image. But open a new issue anyway. For the text alignment I centered it at first but ran into an issue with overflow, can't make it display the start of the text... I'm not enough good at CSS to know if I misused and/or if I can do anything. At least I can add a setting to allow choosing alignment. Can you open a new issue so I'll remember next time I'll work on it. As for timestamp, it might in deed be good thing, can you open another issue on that and I'll see what I can do.