Change rpm node params

This commit is contained in:
Wedge 2016-07-11 19:28:38 +03:00
parent 69fd5d9742
commit b539e73d2f
3 changed files with 4 additions and 6 deletions

View File

@ -2,13 +2,13 @@ ActiveAdmin.register_page 'Builders' do
content do
table do
thead do
["id", "system?", "Hostname", "Busy workers", "Supported Arches", "Supported Platforms"].each &method(:th)
["id", "system?", "Hostname", "Busy workers", "Query String"].each &method(:th)
end
tbody do
RpmBuildNode.all.to_a.each do |node|
next unless node.user_id
tr do
%w(id system host busy_workers supported_arches supported_platforms).each do |col|
%w(id system host busy_workers query_string).each do |col|
td { node.send(col) }
end
end

View File

@ -62,8 +62,7 @@ class Api::V1::JobsController < Api::V1::BaseController
worker_count: params[:worker_count],
busy_workers: params[:busy_workers],
host: params[:host],
supported_arches: params[:supported_arches],
supported_platforms: params[:supported_platforms]
query_string: params[:query_string].to_s
) rescue nil
end
render nothing: true

View File

@ -13,8 +13,7 @@ class RpmBuildNode < Ohm::Model
attribute :busy_workers
attribute :system
attribute :host
attribute :supported_arches
attribute :supported_platforms
attribute :query_string
def user
User.where(id: user_id).first