added some params for build ISO

This commit is contained in:
Vokhmin Alexey V 2012-11-06 20:19:52 +04:00
parent 317f672e32
commit b1722cae75
6 changed files with 34 additions and 3 deletions

View File

@ -11,6 +11,8 @@ class Platforms::ProductBuildListsController < Platforms::BaseController
before_filter :find_product_build_list, :only => [:status_build]
def new
@project = @product_build_list.product.project
@arches = Arch.recent.map{ |a| [a.name, a.id] }
end
def create

View File

@ -25,7 +25,7 @@ class ProductBuildList < ActiveRecord::Base
validates :status, :inclusion => { :in => [BUILD_STARTED, BUILD_COMPLETED, BUILD_FAILED] }
attr_accessor :base_url
attr_accessible :status, :base_url, :branch, :arch_id, :project_id
attr_accessible :status, :base_url, :branch, :arch_id, :project_id, :main_script, :iso_folder, :params
attr_readonly :product_id

View File

@ -3,4 +3,20 @@
= render 'sidebar'
= form_for @product_build_list, :html => {:class => :form} do |f|
= render 'form', :f => f
.leftlist= f.label :lst, t("activerecord.attributes.product_build_lists.lst"), :class => :label
.rightlist= @product_build_list.product.try(:lst)
.both
.leftlist= f.label :project, t("activerecord.attributes.product_build_lists.project"), :class => :label
.rightlist= @product_build_list.product.project.try(:name_with_owner)
.both
.leftlist= f.label :project_version, t("activerecord.attributes.product_build_lists.project_version"), :class => :label
.rightlist= f.select :project_version, versions_for_group_select(@project), :selected => params[:product_build_lists].try(:fetch, :project_version) || "latest_" + @project.default_branch
.both
.leftlist= f.label :arch, t("activerecord.attributes.product_build_lists.arch"), :class => :label
.rightlist= f.select :arch, @arches
.both

View File

@ -42,7 +42,14 @@
= t('layout.products.new_iso_builder')
%br
%br
= render 'platforms/product_build_lists/form', :f => f
.leftlist= f.label :project, t("activerecord.attributes.product.project"), :class => :label
.rightlist= f.autocomplete_field :project, autocomplete_project_platform_products_path(@platform), :id_element => 'src_project_id', :name => 'src_project', :value => @product.project.try(:name_with_owner)
.both
.leftlist= f.label :lst, t("activerecord.attributes.product.lst"), :class => :label
.rightlist= f.text_field :lst, :class => 'text_field'
.both
.leftlist= f.label :repos, t("activerecord.attributes.product.repos"), :class => :label
.rightlist= f.text_area :repos, :class => 'text_field resizable'
.both

View File

@ -13,5 +13,8 @@ class IntegrateNewIsoBuilderWithProducts < ActiveRecord::Migration
add_column :product_build_lists, :repo, :string
add_column :product_build_lists, :arch_id, :integer
add_column :product_build_lists, :params, :string
add_column :product_build_lists, :main_script, :string
add_column :product_build_lists, :iso_folder, :string
end
end

View File

@ -287,6 +287,9 @@ ActiveRecord::Schema.define(:version => 20121106113338) do
t.string "lst"
t.string "repo"
t.integer "arch_id"
t.string "params"
t.string "main_script"
t.string "iso_folder"
end
add_index "product_build_lists", ["product_id"], :name => "index_product_build_lists_on_product_id"