From 4f29a6329666855958b5e1561bb26361e6b03d59 Mon Sep 17 00:00:00 2001 From: Alexey Nayden Date: Fri, 22 Apr 2011 20:13:47 +0400 Subject: [PATCH] dedebug + ui fix --- app/controllers/build_lists_controller.rb | 4 +++- app/models/build_list.rb | 2 -- app/models/build_list/item.rb | 3 ++- config/locales/ru.yml | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/controllers/build_lists_controller.rb b/app/controllers/build_lists_controller.rb index 18c0186d8..5a16e3f28 100644 --- a/app/controllers/build_lists_controller.rb +++ b/app/controllers/build_lists_controller.rb @@ -73,7 +73,9 @@ class BuildListsController < ApplicationController @build_list.name = params[:name] @build_list.additional_repos = ActiveSupport::JSON.decode(params[:additional_repos]) @build_list.set_items(ActiveSupport::JSON.decode(params[:items])) - params[:is_circular] + @build_list.notified_at = Time.now + @build_list.is_circle = (params[:is_circular] != "0") + @build_list.bs_id = params[:id] params[:arch] @build_list.save diff --git a/app/models/build_list.rb b/app/models/build_list.rb index beedec293..11c97d43c 100644 --- a/app/models/build_list.rb +++ b/app/models/build_list.rb @@ -89,9 +89,7 @@ class BuildList < ActiveRecord::Base end def place_build - RAILS_DEFAULT_LOGGER.fatal "place build" self.status = BuildServer.add_build_list project.name, branch_name, project.repository.platform.name, arch.name - RAILS_DEFAULT_LOGGER.fatal "status = #{self.status}" self.status = BUILD_PENDING if self.status == 0 save end diff --git a/app/models/build_list/item.rb b/app/models/build_list/item.rb index a4cb2cdab..e3b9e6064 100644 --- a/app/models/build_list/item.rb +++ b/app/models/build_list/item.rb @@ -5,6 +5,7 @@ class BuildList::Item < ActiveRecord::Base STATUSES = [BuildServer::SUCCESS, BuildServer::DEPENDENCIES_FAIL, BuildServer::SRPM_NOT_FOUND, BuildServer::MOCK_NOT_FOUND] HUMAN_STATUSES = { + nil => :unknown, BuildServer::MOCK_NOT_FOUND => :mock_not_found, BuildServer::DEPENDENCIES_FAIL => :dependencies_fail, BuildServer::SRPM_NOT_FOUND => :srpm_not_found, @@ -35,4 +36,4 @@ class BuildList::Item < ActiveRecord::Base self.class.human_status(status) end -end \ No newline at end of file +end diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 8d1e32347..833a89563 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -115,6 +115,7 @@ ru: dependencies_fail: dependencies fail srpm_not_found: srpm не найден success: собран + unknown: ожидает сборки statuses: build_error: ошибка сборки mock_not_found: mock не найден