2011-10-14 07:35:25 +01:00
|
|
|
class DownloadsController < ApplicationController
|
2011-10-24 14:01:15 +01:00
|
|
|
before_filter :authenticate_user!
|
2011-10-28 18:55:40 +01:00
|
|
|
before_filter :check_global_access
|
2011-10-24 14:01:15 +01:00
|
|
|
|
2011-10-14 07:35:25 +01:00
|
|
|
def index
|
|
|
|
@downloads = Download.paginate :page => params[:page], :per_page => 30
|
|
|
|
end
|
2011-10-31 15:57:44 +00:00
|
|
|
|
|
|
|
def refresh
|
|
|
|
Download.rotate_nginx_log
|
|
|
|
Download.send_later :parse_and_remove_nginx_log
|
|
|
|
|
|
|
|
redirect_to downloads_path, :notice => t('flash.downloads.statistics_refreshed')
|
|
|
|
end
|
2011-10-14 07:35:25 +01:00
|
|
|
end
|