adds tooltips into several places
This commit is contained in:
parent
aa4a9b9b1a
commit
2d7bc69596
5 changed files with 12 additions and 7 deletions
|
@ -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
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
- 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
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.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 @@
|
||||||
|
|
||||||
%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)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.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
|
||||||
|
|
Loading…
Reference in a new issue