Skip to content

Commit

Permalink
Merge pull request #2635 from hennevogel/bugfix_buildresults
Browse files Browse the repository at this point in the history
Bugfix buildresults
  • Loading branch information
hennevogel committed Feb 2, 2017
2 parents 0ed76df + 0650b56 commit fa267e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/api/app/controllers/webui/package_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,11 @@ def import_spec

def buildresult
check_ajax

# FIXME: OMG, if you call Package.get_by_project_and_name( 'blah', 'blubb', {follow_project_links: true} )
# then @package.project might not be 'blah' but another project...
@package.project = @project

render partial: 'buildstatus'
end

Expand Down
5 changes: 4 additions & 1 deletion src/api/app/views/webui/package/_buildstatus.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
<table>
<% previous_repo = nil %>
<% results.each do |result| %>
<% repository = @project.repositories.find_by_name(result.repository) %>
<% next unless repository %>
<% next unless repository.architectures.pluck(:name).include?(result.architecture) %>
<tr>
<% if result.repository != previous_repo %>
<td title="<%= result.repository %>" rowspan="<%= @package.repositories.find_by_name(result.repository).architectures.length %>">
<td title="<%= result.repository %>" rowspan="<%= repository.architectures.length %>">
<%= link_to(word_break(result.repository, 22), { action: :binaries, controller: :package, project: @project, package: @package, repository: result.repository }, { title: "Binaries for #{result.repository}" }) %>
</td>
<% end %>
Expand Down

0 comments on commit fa267e9

Please sign in to comment.