Commit 2d7bc695 authored by Rydkin Maxim's avatar Rydkin Maxim

adds tooltips into several places

parent aa4a9b9b
...@@ -121,4 +121,8 @@ module CiStatusHelper ...@@ -121,4 +121,8 @@ module CiStatusHelper
status.respond_to?(:label) && status.respond_to?(:label) &&
status.respond_to?(:icon) status.respond_to?(:icon)
end end
def status_title(pipeline)
"This pipeline is redundant as a newer pipeline exists (canceled by ##{pipeline.auto_canceled_by_id} pipeline)" if pipeline.auto_canceled_by_id? && pipeline.canceled?
end
end end
- status = local_assigns.fetch(:status) - status = local_assigns.fetch(:status)
- link = local_assigns.fetch(:link, true) - link = local_assigns.fetch(:link, true)
- css_classes = "ci-status ci-#{status.group}" - title = local_assigns.fetch(:title, nil)
- css_classes = "ci-status ci-#{status.group} #{'has-tooltip' if title.present? }"
- if link && status.has_details? - if link && status.has_details?
= link_to status.details_path, class: css_classes do = link_to status.details_path, class: css_classes, title: title do
= custom_icon(status.icon) = custom_icon(status.icon)
= status.text = status.text
- else - else
%span{ class: css_classes } %span{ class: css_classes, title: title }
= custom_icon(status.icon) = custom_icon(status.icon)
= status.text = status.text
.content-block.build-header.top-area .content-block.build-header.top-area
.header-content .header-content
= render 'ci/status/badge', status: @build.detailed_status(current_user), link: false = render 'ci/status/badge', status: @build.detailed_status(current_user), link: false, title: status_title(@build.pipeline)
Job Job
%strong.js-build-id ##{@build.id} %strong.js-build-id ##{@build.id}
in pipeline in pipeline
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
%tr.build.commit{ class: ('retried' if retried) } %tr.build.commit{ class: ('retried' if retried) }
%td.status %td.status
= render "ci/status/badge", status: build.detailed_status(current_user) = render "ci/status/badge", status: build.detailed_status(current_user), title: status_title(build.pipeline)
%td.branch-commit %td.branch-commit
- if can?(current_user, :read_build, build) - if can?(current_user, :read_build, build)
......
.page-content-header .page-content-header
.header-main-content .header-main-content
= render 'ci/status/badge', status: @pipeline.detailed_status(current_user) = render 'ci/status/badge', status: @pipeline.detailed_status(current_user), title: status_title(@pipeline)
%strong Pipeline ##{@pipeline.id} %strong Pipeline ##{@pipeline.id}
triggered #{time_ago_with_tooltip(@pipeline.created_at)} triggered #{time_ago_with_tooltip(@pipeline.created_at)}
- if @pipeline.user - if @pipeline.user
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment