Skip to content

Commit

Permalink
Merge pull request #5835 from DavidKang/sprint47/bugsquad/5834-issue
Browse files Browse the repository at this point in the history
Add extra parameter in build result to switch to webui2
  • Loading branch information
hennevogel committed Sep 11, 2018
2 parents 5d7f591 + 7145890 commit 4a85f8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/api/app/controllers/webui/package_controller.rb
Expand Up @@ -921,10 +921,10 @@ def buildresult
show_all = params[:show_all] == 'true'
@index = params[:index]
@buildresults = @package.buildresult(@project, show_all)
switch_to_webui2
switch_to_webui2 if params[:switch].present?
render partial: 'buildstatus', locals: { buildresults: @buildresults, index: @index, project: @project }
else
switch_to_webui2
switch_to_webui2 if params[:switch].present?
render partial: 'no_repositories', locals: { project: @project }
end
end
Expand All @@ -950,7 +950,7 @@ def rpmlint_result
@repo_list << [repo_name, valid_xml_id(elide(repo_name, 30))]
end

return if switch_to_webui2
return if params[:switch].present? && switch_to_webui2

if @repo_list.empty?
render partial: 'no_repositories', locals: { project: @project }
Expand Down
1 change: 1 addition & 0 deletions src/api/app/views/webui2/shared/_buildresult_box.html.haml
@@ -1,6 +1,7 @@
:ruby
index ||= ''
ajax_data = {}
ajax_data['switch'] = 'true' # FIXME: Remove this when request show is available in bootstrap
ajax_data['project'] = h(project) if defined?(project)
ajax_data['package'] = h(package) if defined?(package)
ajax_data['index'] = h(index) if defined?(index)
Expand Down

0 comments on commit 4a85f8e

Please sign in to comment.