diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-19 21:09:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-19 21:09:09 +0300 |
commit | 6463521e08b00e62d3c877aefd8517f5387d54ab (patch) | |
tree | 1e9c49e6a7cd0e926d32f81c92604cd03ee57fac /app/helpers/ci | |
parent | 6a3c4476fa8f1c686eadbed05262bce95504ffa7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/ci')
-rw-r--r-- | app/helpers/ci/jobs_helper.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/helpers/ci/jobs_helper.rb b/app/helpers/ci/jobs_helper.rb index ec17eccf693..a0d169c1358 100644 --- a/app/helpers/ci/jobs_helper.rb +++ b/app/helpers/ci/jobs_helper.rb @@ -18,6 +18,21 @@ module Ci "retry_outdated_job_docs_url" => help_page_path('ci/pipelines/settings', anchor: 'retry-outdated-jobs') } end + + def job_counts + { + "all" => limited_counter_with_delimiter(@all_builds), + "pending" => limited_counter_with_delimiter(@all_builds.pending), + "running" => limited_counter_with_delimiter(@all_builds.running), + "finished" => limited_counter_with_delimiter(@all_builds.finished) + } + end + + def job_statuses + statuses = Ci::HasStatus::AVAILABLE_STATUSES + + statuses.to_h { |status| [status, status.upcase] } + end end end |