diff options
author | Bob Van Landuyt <bob@gitlab.com> | 2017-03-14 13:35:46 +0100 |
---|---|---|
committer | Bob Van Landuyt <bob@gitlab.com> | 2017-03-16 12:31:27 +0100 |
commit | a33fbb3c83bb1663fa63ce42ced54926f050b8dc (patch) | |
tree | 93129c624b3370856e1df2df3cc8a40010934717 /app/helpers | |
parent | 4b249d522c0077113745225fe945d8629c58fa34 (diff) | |
download | gitlab-ce-a33fbb3c83bb1663fa63ce42ced54926f050b8dc.tar.gz |
Render cached pipeline status on project dashboard
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/ci_status_helper.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb index a7cdca9ba2e..a91d19dc347 100644 --- a/app/helpers/ci_status_helper.rb +++ b/app/helpers/ci_status_helper.rb @@ -59,6 +59,20 @@ module CiStatusHelper custom_icon(icon_name) end + def render_project_pipeline_status(pipeline_status, tooltip_placement: 'auto left') + project = pipeline_status.project + path = pipelines_namespace_project_commit_path( + project.namespace, + project, + pipeline_status.sha) + + render_status_with_link( + 'commit', + pipeline_status.status, + path, + tooltip_placement: tooltip_placement) + end + def render_commit_status(commit, ref: nil, tooltip_placement: 'auto left') project = commit.project path = pipelines_namespace_project_commit_path( |