debian-mirror-gitlab/app/controllers/ci/admin/builds_controller.rb

19 lines
396 B
Ruby
Raw Normal View History

2015-09-25 12:07:36 +05:30
module Ci
class Admin::BuildsController < Ci::Admin::ApplicationController
def index
@scope = params[:scope]
@builds = Ci::Build.order('created_at DESC').page(params[:page]).per(30)
@builds =
case @scope
when "pending"
@builds.pending
when "running"
@builds.running
else
@builds
end
end
end
end