From 59c381543b776d9fbaf9e1033b168c5ae878eb72 Mon Sep 17 00:00:00 2001 From: Edmore Moyo Date: Fri, 12 Apr 2013 09:09:11 +0200 Subject: [PATCH] images can be clicked on dashboard to get larger image --- bin/feeds.rb | 2 +- views/dashboard.haml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/feeds.rb b/bin/feeds.rb index 0f9b257..55bace8 100755 --- a/bin/feeds.rb +++ b/bin/feeds.rb @@ -17,7 +17,7 @@ login_cridentials = "-u #{cam_user} #{cam_password}" unless cam_user == "" FileUtils.mkdir_p("#{app_root}/public/feeds/#{venue_name}/") - cmds << "openRTSP #{login_cridentials} -F #{venue_name} -d 10 -b 300000 #{cam_url} 2> /dev/null && ffmpeg -i #{venue_name}video-H264-1 -r 1 -s 320x180 -ss 5 -vframes 1 -f image2 #{app_root}/public/feeds/#{venue_name}/#{venue_name}.jpeg 2> /dev/null && rm -f #{venue_name}video-H264-1 2> /dev/null" + cmds << "openRTSP #{login_cridentials} -F #{venue_name} -d 10 -b 300000 #{cam_url} 2> /dev/null && ffmpeg -i #{venue_name}video-H264-1 -r 1 -s 1280x720 -ss 5 -vframes 1 -f image2 #{app_root}/public/feeds/#{venue_name}/#{venue_name}_big.jpeg 2>/dev/null && ffmpeg -i #{app_root}/public/feeds/#{venue_name}/#{venue_name}_big.jpeg -s 320x180 -f image2 #{app_root}/public/feeds/#{venue_name}/#{venue_name}.jpeg 2>/dev/null && rm -f #{venue_name}video-H264-1 2>/dev/null" end cmds.each{|c| system c } diff --git a/views/dashboard.haml b/views/dashboard.haml index ec929e8..161bb94 100644 --- a/views/dashboard.haml +++ b/views/dashboard.haml @@ -10,7 +10,8 @@ - venues.each do |venue| %div.grid_venue -unless venue[3].nil? - %img{:src => "feeds/#{venue[0]}/#{venue[0]}.jpeg"} + %a{:href => "feeds/#{venue[0]}/#{venue[0]}_big.jpeg"} + %img{:src => "feeds/#{venue[0]}/#{venue[0]}.jpeg"} -if not_regularly_updating(venue[3]) %span.flag = "#{venue[0]} (#{time_to_string(venue[3])})"