Skip to content

Commit

Permalink
Simplify monitor action
Browse files Browse the repository at this point in the history
  • Loading branch information
hennevogel committed Sep 21, 2023
1 parent 5101acf commit e995b73
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/api/app/controllers/webui/project_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -310,19 +310,21 @@ def move_path
end

def monitor
unless (build_results = monitor_buildresult)
@buildresult_unavailable = true
return
end
build_results = monitor_buildresult

monitor_parse_buildresult(build_results)
if build_results
# This method sets a bunch of instance variables used in the view and below...
monitor_parse_buildresult(build_results)

# extract repos
repohash = {}
@statushash.each do |repo, arch_hash|
repohash[repo] = arch_hash.keys.sort!
# extract repos
repohash = {}
@statushash.each do |repo, arch_hash|
repohash[repo] = arch_hash.keys.sort!
end
@repoarray = repohash.sort
else
@buildresult_unavailable = true
end
@repoarray = repohash.sort
end

def clear_failed_comment
Expand Down

0 comments on commit e995b73

Please sign in to comment.