Skip to content

Commit

Permalink
[frontend] Fix link to job history page for multibuild packages
Browse files Browse the repository at this point in the history
With 9347214 the binary view got fixed
for multibuild packages by using the using the package (multibuild) name
instead of the package container.

While this fixed the binary view, some of the page that got linked from
there were still not handling multibuild packages.
This commit is fixing the link to the job history page.
  • Loading branch information
bgeuken committed May 3, 2018
1 parent 022b9ef commit 62e0d9d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ def index
private

def set_package
# Store the package name in case of multibuilds
@package_name = params[:package_name]
@package = ::Package.get_by_project_and_name(@project.to_param, params[:package_name],
use_source: false, follow_project_links: true, follow_multibuild: true)
@is_link = @package.is_link? || @package.is_local_link?
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/views/webui/package/binaries.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<% if result[:statistics] %>
<%= link_to sprited_text('server_chart', 'Show'), package_statistics_path(project: @project, package: @package_name, repository: @repository, arch: result[:arch]) %> used resources
<% end %>
<%= link_to sprited_text('text_indent', 'Job history'), index_package_job_history_path(project: @project, package_name: @package, repository: @repository, arch: result[:arch]), class: '' %> list
<%= link_to sprited_text('text_indent', 'Job history'), index_package_job_history_path(project: @project, package_name: @package_name, repository: @repository, arch: result[:arch]), class: '' %> list
<%= link_to sprited_text('information', 'Build Reason'), index_package_build_reason_path(project: @project, package_name: @package_name, repository: @repository, arch: result[:arch]), class: '' %>
</p>
<% end %>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:ruby
@pagetitle = "Job history of #{@project} / #{@package}"
@pagetitle = "Job history of #{@project} / #{@package_name}"
@metarobots = 'index,nofollow'
job_history_breadcrumb(@project, @package, 'Job history')

Expand Down

0 comments on commit 62e0d9d

Please sign in to comment.