This is Dashing widget to include slide show on your dashboard or one of its pages.
##Usage
Make sure to install RMagick
gem to support image resizing. The widget also needs my slightly improved standard image widget. Put the slide_show.rb
file in your /jobs
folder and slide_show_settings.json
to /assets/config/
.
Make sure directory /assets/config
and /assets/images/slide_show
are accessible by Dashing user.
To include the widget in a dashboard, add the following snippet to the dashboard layout file:
<li data-row="1" data-col="1" data-sizex="4" data-sizey="2">
<div data-id="SlideShow" data-view="Image" data-width="100%"></div>
</li>
There are 2 scheduler jobs used:
First one gets randomized list of image files with pattern from source directory, resizes them to needed size and puts them to /assets/images/slide_show/<widget name>
. It is executed at 5:00 and 18:00.
Second randomly loops every 30 seconds through the files in /assets/images/slide_show/<widget name>
and sends event with random file URL
##Settings
Mount your images directory to any directory on your server to be accessible by Dashing user. Amend /assets/config/slide_show_settings.json
to have parameters specified.
There is no need to restart service if job is already running and settings file is amended.
@slize,
Thanks for nice words and especially for your excellent QA work! Yesterday I started wondering myself, why those pictures are always the same ;). Code updated.