From b539e73d2f36af98080d6acbcb8e2d1f62e23509 Mon Sep 17 00:00:00 2001 From: Wedge Date: Mon, 11 Jul 2016 19:28:38 +0300 Subject: [PATCH] Change rpm node params --- app/admin/builders.rb | 4 ++-- app/controllers/api/v1/jobs_controller.rb | 3 +-- app/models/rpm_build_node.rb | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/admin/builders.rb b/app/admin/builders.rb index 2d78674b1..ae15d601a 100644 --- a/app/admin/builders.rb +++ b/app/admin/builders.rb @@ -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 diff --git a/app/controllers/api/v1/jobs_controller.rb b/app/controllers/api/v1/jobs_controller.rb index 946bc7588..d2464c55b 100644 --- a/app/controllers/api/v1/jobs_controller.rb +++ b/app/controllers/api/v1/jobs_controller.rb @@ -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 diff --git a/app/models/rpm_build_node.rb b/app/models/rpm_build_node.rb index c19f9508f..be6e989a2 100644 --- a/app/models/rpm_build_node.rb +++ b/app/models/rpm_build_node.rb @@ -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