Change rpm node params
This commit is contained in:
parent
69fd5d9742
commit
b539e73d2f
|
@ -2,13 +2,13 @@ ActiveAdmin.register_page 'Builders' do
|
||||||
content do
|
content do
|
||||||
table do
|
table do
|
||||||
thead 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
|
end
|
||||||
tbody do
|
tbody do
|
||||||
RpmBuildNode.all.to_a.each do |node|
|
RpmBuildNode.all.to_a.each do |node|
|
||||||
next unless node.user_id
|
next unless node.user_id
|
||||||
tr do
|
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) }
|
td { node.send(col) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -62,8 +62,7 @@ class Api::V1::JobsController < Api::V1::BaseController
|
||||||
worker_count: params[:worker_count],
|
worker_count: params[:worker_count],
|
||||||
busy_workers: params[:busy_workers],
|
busy_workers: params[:busy_workers],
|
||||||
host: params[:host],
|
host: params[:host],
|
||||||
supported_arches: params[:supported_arches],
|
query_string: params[:query_string].to_s
|
||||||
supported_platforms: params[:supported_platforms]
|
|
||||||
) rescue nil
|
) rescue nil
|
||||||
end
|
end
|
||||||
render nothing: true
|
render nothing: true
|
||||||
|
|
|
@ -13,8 +13,7 @@ class RpmBuildNode < Ohm::Model
|
||||||
attribute :busy_workers
|
attribute :busy_workers
|
||||||
attribute :system
|
attribute :system
|
||||||
attribute :host
|
attribute :host
|
||||||
attribute :supported_arches
|
attribute :query_string
|
||||||
attribute :supported_platforms
|
|
||||||
|
|
||||||
def user
|
def user
|
||||||
User.where(id: user_id).first
|
User.where(id: user_id).first
|
||||||
|
|
Loading…
Reference in New Issue