diff options
Diffstat (limited to 'web/routes/repoman_checks.rb')
-rw-r--r-- | web/routes/repoman_checks.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/web/routes/repoman_checks.rb b/web/routes/repoman_checks.rb new file mode 100644 index 0000000..a85f8ce --- /dev/null +++ b/web/routes/repoman_checks.rb @@ -0,0 +1,24 @@ +class RubyTinderbox < Sinatra::Base + get '/repoman_checks' do + update_timestamp = Build.order(:timestamp).last[:timestamp] + portage_timestamp = Package.first[:portage_timestamp] + repomans = [] + Package.each do |package| + repomans << package.repoman_dataset.where(target: 'current').reverse_order(:timestamp).first + end + repomans = repomans.compact.sort_by { |repoman| repoman.package[:identifier] } + erb :'repoman/repoman_checks', locals: { repomans: repomans, update_timestamp: update_timestamp, portage_timestamp: portage_timestamp } + end + + get '/repoman_checks/:sha1' do + package = Package.where(sha1: params[:sha1]).first + repomans = package.repoman_dataset.where(target: 'current').reverse_order(:timestamp) + erb :'repoman/repoman_history', locals: { repomans: repomans } + end + + get '/repoman_checks/:sha1/:timestamp' do + package = Package.where(sha1: params[:sha1]).first + repoman = package.repoman_dataset.where(timestamp: params[:timestamp]).first + erb :'repoman/repoman_logs', locals: { package: package, repoman: repoman } + end +end |