#836: update build_lists UI, API

This commit is contained in:
Vokhmin Alexey V 2013-01-22 19:28:59 +04:00
parent eeb58ccd8e
commit f0928badc8
8 changed files with 20 additions and 6 deletions

View File

@ -58,5 +58,11 @@ json.build_list do |json|
json_mass_build.(@build_list.mass_build, :id, :name)
end if @build_list.mass_build
json.logs (@build_list.results || []) do |json_logs, result|
json_logs.file_name result['file_name']
json_logs.size result['size']
json_logs.url "#{APP_CONFIG['file_store_url']}/api/v1/file_stores/#{result['sha1']}"
end if @build_list.new_core?
json.url api_v1_build_list_path(@build_list, :format => :json)
end

View File

@ -1,6 +1,8 @@
%h3= t("layout.product_build_lists.results")
- unless pbl.results.present?
%h4.nomargin= t("layout.product_build_lists.no_results")
- header = subject.is_a?(BuildList) ? 'logs' : 'results'
- prefix = 'layout.' << subject.class.name.underscore << 's.'
%h3= t("#{prefix}#{header}")
- unless subject.results.present?
%h4.nomargin= t("#{prefix}no_#{header}")
- else
%table.tablesorter.width565{:cellpadding => "0", :cellspacing => "0"}
%thead
@ -9,7 +11,7 @@
%th= t("activerecord.attributes.product_build_list/results.sha1")
%th= t("activerecord.attributes.product_build_list/results.size")
%tbody
- pbl.results.each do |item|
- subject.results.each do |item|
%tr
- sha1 = item['sha1']
- filename = item['file_name']

View File

@ -35,7 +35,7 @@
- if pbl.build_started? || pbl.build_canceling?
= render 'shared/log', { :build_started => true, :get_log_path => log_platform_product_product_build_list_path(pbl.product.platform, pbl.product, pbl) }
= render 'results', :pbl => pbl
= render 'results', :subject => pbl
:javascript
$(function(){

View File

@ -178,7 +178,7 @@
- if @build_list.new_core?
.hr
= render 'platforms/product_build_lists/results', :pbl => @build_list
= render 'platforms/product_build_lists/results', :subject => @build_list
:javascript
$('article .all').addClass('bigpadding');

View File

@ -46,6 +46,8 @@ en:
layout:
build_lists:
logs: Logs
no_logs: No logs
filter_header: Filter
current: Curent
created_at_start: "Build to start on:"

View File

@ -45,6 +45,8 @@ ru:
layout:
build_lists:
logs: Логи
no_logs: Нет логов
filter_header: Фильтр
current: Текущие
created_at_start: "Время постановки на сборку с:"

View File

@ -3,6 +3,7 @@ en:
product_build_lists:
logs: Logs (last 100 lines)
results: Results
no_results: No results
work_env: Work environment
iso_builder_folder: folder with contents of the GIT project
results_folder: all files from this folder will be uploaded into the file-store

View File

@ -3,6 +3,7 @@ ru:
product_build_lists:
logs: Логи (последнии 100 строк)
results: Результаты
no_results: Нет результатов
work_env: Рабочее пространство
iso_builder_folder: папка с содержимым GIT проекта
results_folder: все файлы из этой папки будут загружены на file-store