2017-05-29 06:02:06 -04:00
< script >
2017-09-01 05:46:08 -04:00
import userAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue' ;
import tooltip from '../../vue_shared/directives/tooltip' ;
import popover from '../../vue_shared/directives/popover' ;
2017-05-29 06:02:06 -04:00
2017-09-01 05:46:08 -04:00
export default {
props : {
pipeline : {
type : Object ,
required : true ,
} ,
2017-09-01 06:20:14 -04:00
autoDevopsHelpPath : {
type : String ,
required : true ,
} ,
2017-05-29 06:02:06 -04:00
} ,
2017-09-01 05:46:08 -04:00
components : {
userAvatarLink ,
2017-05-29 06:02:06 -04:00
} ,
2017-09-01 05:46:08 -04:00
directives : {
tooltip ,
popover ,
} ,
computed : {
user ( ) {
return this . pipeline . user ;
} ,
autoDevOpsTitle ( ) {
return '<div class="autodevops-title">This pipeline makes use of a predefined CI/CD configuration enabled by <b>Auto DevOps.</b></div>' ;
} ,
autoDevOpsContent ( ) {
2017-09-01 06:20:14 -04:00
return ` <a class="autodevops-link" href=" ${ this . autoDevopsHelpPath } " target="_blank" rel="noopener noreferrer nofollow">Learn more about Auto DevOps</a> ` ;
2017-09-01 05:46:08 -04:00
} ,
} ,
} ;
2017-05-29 06:02:06 -04:00
< / script >
< template >
2017-06-16 08:00:28 -04:00
< div class = "table-section section-15 hidden-xs hidden-sm" >
2017-05-29 06:02:06 -04:00
< a
: href = "pipeline.path"
class = "js-pipeline-url-link" >
< span class = "pipeline-id" > # { { pipeline . id } } < / span >
< / a >
< span > by < / span >
< user-avatar-link
v - if = "user"
class = "js-pipeline-url-user"
2017-06-02 09:24:42 -04:00
: link - href = "pipeline.user.path"
2017-05-29 06:02:06 -04:00
: img - src = "pipeline.user.avatar_url"
: tooltip - text = "pipeline.user.name"
/ >
< span
v - if = "!user"
class = "js-pipeline-url-api api" >
API
< / span >
2017-06-16 08:00:28 -04:00
< div class = "label-container" >
< span
v - if = "pipeline.flags.latest"
2017-06-06 16:46:31 -04:00
v - tooltip
2017-06-16 08:00:28 -04:00
class = "js-pipeline-url-latest label label-success"
2017-06-06 16:46:31 -04:00
title = "Latest pipeline for this branch" >
2017-06-16 08:00:28 -04:00
latest
< / span >
< span
v - if = "pipeline.flags.yaml_errors"
2017-06-06 16:46:31 -04:00
v - tooltip
2017-06-16 08:00:28 -04:00
class = "js-pipeline-url-yaml label label-danger"
2017-06-06 16:46:31 -04:00
: title = "pipeline.yaml_errors" >
2017-06-16 08:00:28 -04:00
yaml invalid
< / span >
2017-09-01 05:46:08 -04:00
< a
2017-08-31 07:47:29 -04:00
v - if = "pipeline.flags.auto_devops"
2017-09-01 05:46:08 -04:00
class = "js-pipeline-url-autodevops label label-info"
v - popover : html
tabindex = "0"
role = "button"
data - trigger = "focus"
data - placement = "top"
: title = "autoDevOpsTitle"
: data - content = "autoDevOpsContent" >
2017-08-31 07:47:29 -04:00
Auto DevOps
2017-09-01 05:46:08 -04:00
< / a >
2017-06-16 08:00:28 -04:00
< span
v - if = "pipeline.flags.stuck"
class = "js-pipeline-url-stuck label label-warning" >
stuck
< / span >
< / div >
< / div >
2017-05-29 06:02:06 -04:00
< / template >