#82: sort of mass builds on monitoring page by created date
This commit is contained in:
parent
6aede76ef2
commit
fc9ef8e0af
|
@ -3,6 +3,7 @@ class MassBuild < ActiveRecord::Base
|
|||
belongs_to :user
|
||||
has_many :build_lists, :dependent => :destroy
|
||||
|
||||
scope :recent, order("#{table_name}.created_at DESC")
|
||||
scope :by_platform, lambda { |platform| where(:platform_id => platform.id) }
|
||||
scope :outdated, where("#{table_name}.created_at < ?", Time.now + 1.day - BuildList::MAX_LIVE_TIME)
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
= f.select :arch_id, Arch.recent.collect{|arch| [arch.name, arch.id]}, {:include_blank => true, :selected => @filter.arch_id}, html_options.merge(:id => 'architecture')
|
||||
%h3.medium= t 'activerecord.models.mass_build'
|
||||
.lineForm.aside
|
||||
= f.select :mass_build_id, options_from_collection_for_select( MassBuild.all, :id, :name, @filter.mass_build_id ), {:include_blank => true, :selected => @filter.mass_build_id},
|
||||
= f.select :mass_build_id, options_from_collection_for_select( MassBuild.recent, :id, :name, @filter.mass_build_id ), {:include_blank => true, :selected => @filter.mass_build_id},
|
||||
html_options.merge(:id => 'mass_build')
|
||||
|
||||
.column
|
||||
|
|
Loading…
Reference in New Issue