Commit ebf05201 authored by Rydkin Maxim's avatar Rydkin Maxim

add tooltip on badge in pipelines index

parent 2d7bc695
......@@ -36,7 +36,7 @@ export default {
computed: {
cssClasses() {
return `ci-status ci-${this.pipeline.details.status.group}`;
return `ci-status ci-${this.pipeline.details.status.group} has-tooltip`;
},
detailsPath() {
......@@ -47,12 +47,17 @@ export default {
content() {
return `${this.svg} ${this.pipeline.details.status.text}`;
},
tooltipTitle() {
return this.pipeline.details.status_tooltip;
}
},
template: `
<td class="commit-link">
<a
:class="cssClasses"
:href="detailsPath"
:title="tooltipTitle"
v-html="content">
</a>
</td>
......
......@@ -13,6 +13,7 @@ class PipelineEntity < Grape::Entity
expose :details do
expose :detailed_status, as: :status, with: StatusEntity
expose :status_tooltip
expose :duration
expose :finished_at
expose :stages, using: StageEntity
......@@ -81,4 +82,8 @@ class PipelineEntity < Grape::Entity
def detailed_status
pipeline.detailed_status(request.user)
end
def status_tooltip
"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
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