#267: fixed link to logs
This commit is contained in:
parent
a32721998e
commit
747b279f60
|
@ -1,5 +1,7 @@
|
||||||
# -*- encoding : utf-8 -*-
|
# -*- encoding : utf-8 -*-
|
||||||
class Platforms::ProductBuildListsController < Platforms::BaseController
|
class Platforms::ProductBuildListsController < Platforms::BaseController
|
||||||
|
include BuildsHelper
|
||||||
|
|
||||||
before_filter :authenticate_user!
|
before_filter :authenticate_user!
|
||||||
skip_before_filter :authenticate_user!, :only => [:index, :show, :log] if APP_CONFIG['anonymous_access']
|
skip_before_filter :authenticate_user!, :only => [:index, :show, :log] if APP_CONFIG['anonymous_access']
|
||||||
before_filter :redirect_to_full_path_if_short_url, :only => :show
|
before_filter :redirect_to_full_path_if_short_url, :only => :show
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
# -*- encoding : utf-8 -*-
|
# -*- encoding : utf-8 -*-
|
||||||
class Projects::BuildListsController < Projects::BaseController
|
class Projects::BuildListsController < Projects::BaseController
|
||||||
|
include BuildsHelper
|
||||||
|
|
||||||
NESTED_ACTIONS = [:index, :new, :create]
|
NESTED_ACTIONS = [:index, :new, :create]
|
||||||
|
|
||||||
before_filter :authenticate_user!
|
before_filter :authenticate_user!
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
# -*- encoding : utf-8 -*-
|
||||||
|
module BuildsHelper
|
||||||
|
|
||||||
|
def file_store_results_url(sha1, file_name)
|
||||||
|
url = "#{APP_CONFIG['file_store_url']}/api/v1/file_stores/#{sha1}"
|
||||||
|
url << '.log?show=true' if file_name =~ /.*\.(log|txt)$/
|
||||||
|
url
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
|
@ -8,7 +8,7 @@ json.product_build_list do
|
||||||
json.file_name result['file_name']
|
json.file_name result['file_name']
|
||||||
json.sha1 result['sha1']
|
json.sha1 result['sha1']
|
||||||
json.size result['size']
|
json.size result['size']
|
||||||
json.url "#{APP_CONFIG['file_store_url']}/api/v1/file_stores/#{result['sha1']}"
|
json.url file_store_results_url(result['sha1'], result['file_name'])
|
||||||
end if @product_build_list.results.present?
|
end if @product_build_list.results.present?
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -34,7 +34,7 @@ json.build_list do
|
||||||
json.file_name result['file_name']
|
json.file_name result['file_name']
|
||||||
json.sha1 result['sha1']
|
json.sha1 result['sha1']
|
||||||
json.size result['size']
|
json.size result['size']
|
||||||
json.url "#{APP_CONFIG['file_store_url']}/api/v1/file_stores/#{result['sha1']}"
|
json.url file_store_results_url(result['sha1'], result['file_name'])
|
||||||
end if @build_list.new_core? && @build_list.results.present?
|
end if @build_list.new_core? && @build_list.results.present?
|
||||||
|
|
||||||
json.packages @build_list.packages do |package|
|
json.packages @build_list.packages do |package|
|
||||||
|
|
Loading…
Reference in New Issue