Dalvany / dalvany-image-panel

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

Image slideshow for panel #35

Closed f0ma closed 2 years ago

f0ma commented 3 years ago

Hello!

Do you have a plan to add opportunity to display image series as slideshow for your plugin? I think it's a useful feature.

Currently to make it I use dirty jquery hack:

setInterval(function(){
    $('div.container').each(function(){
        $(this).children('img').hide();
        var len = $(this).children('img').length;
        var idx = Math.round(Date.now() / 1000) % len;
        $(this).children('img:eq('+idx+')').show();
    })
}, 1000);

It works but it is a really ugly solution.

Dalvany commented 3 years ago

Hello, thanks for using the plugin. I'll see what I can do but don't expect it soon, I'd like to work on #22 before and I have started yet.

f0ma commented 3 years ago

In any case thank you for your job!

Dalvany commented 3 years ago

Hello @f0ma next release will allow to display images in a slideshow. Can you test this pre-release ?

f0ma commented 2 years ago

Thank you very match! Working well (Grafana 7.5.7). For my case I was change Slide to Fade transition effect and set transitionDuration="1" for instant image replacing. I do not know it is a usable option or actual for my dashbord only.

Dalvany commented 2 years ago

I'll add the effect selection.

Dalvany commented 2 years ago

And another setting to choose transition duration

Dalvany commented 2 years ago

@f0ma, I made the changes and updated pre-release, you can choose between Slideand Fade transitions (can't make the Zoom one working though) and set the transition duration. But I'll keep Slide and 1000 ms transition as defaults.

f0ma commented 2 years ago

@Dalvany, Thank you! Works perfectly. But I was not found this changes in pre-release bundle, only in commit https://github.com/Dalvany/dalvany-image-panel/commit/7fa101dbc340a5c230f2c3f557f0fd782acf53b5

Dalvany commented 2 years ago

@f0ma Sorry I might have made a mistake, the v2.4.0 tag doesn't seem to link to the latest commit. I'll redo the pre-release.

Dalvany commented 2 years ago

Fix, now the tag and the pre-release use the correct commit

Dalvany commented 2 years ago

I will publish the release on grafana.