Revision c39b3cff
Added by Ondřej Pražák over 6 years ago
app/assets/javascripts/foreman_pipeline/jobs/details/project-discovery/job-projects-discovery.controller.js | ||
---|---|---|
14 | 14 |
setDetails(task); |
15 | 15 |
if (!task.pending) { |
16 | 16 |
Task.unregisterSearch($scope.taskSearchId); |
17 |
if (task.result !== "success") { |
|
18 |
if (task.humanized && task.humanized.errors && task.humanized.errors.length > 0) { |
|
19 |
task.humanized.errors.forEach( function (err) { |
|
20 |
$scope.errorMessages.push(err); |
|
21 |
}); |
|
22 |
} else { |
|
23 |
$scope.errorMessages.push("Unknown error occured when listing projects on Jenkins server"); |
|
24 |
} |
|
25 |
} |
|
17 | 26 |
} |
18 | 27 |
} |
19 | 28 |
|
... | ... | |
30 | 39 |
projects = _.map(project_names, function (item) { |
31 | 40 |
return {'name': item} |
32 | 41 |
}); |
33 |
|
|
42 |
|
|
34 | 43 |
sorted = _.sortBy(projects, function (item) { |
35 | 44 |
return item.name; |
36 | 45 |
}); |
app/lib/actions/foreman_pipeline/jenkins/list.rb | ||
---|---|---|
6 | 6 |
output[:projects] = job.jenkins_instance.client.job.list input[:filter] |
7 | 7 |
end |
8 | 8 |
|
9 |
def rescue_strategy_for_self |
|
10 |
Dynflow::Action::Rescue::Skip |
|
11 |
end |
|
12 |
|
|
9 | 13 |
def humanized_name |
10 | 14 |
"List projects in Jenkins Instance: %s" % job.jenkins_instance.name |
11 | 15 |
end |
Also available in: Unified diff
Fixes #12581 - Show errors when project listing fails