2017-05-29 06:02:06 -04:00
|
|
|
<script>
|
2018-06-27 10:28:05 -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
|
|
|
|
2018-06-27 10:28:05 -04:00
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
userAvatarLink,
|
|
|
|
},
|
|
|
|
directives: {
|
|
|
|
tooltip,
|
|
|
|
popover,
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
pipeline: {
|
|
|
|
type: Object,
|
|
|
|
required: true,
|
2018-01-04 19:18:35 -05:00
|
|
|
},
|
2018-06-27 10:28:05 -04:00
|
|
|
autoDevopsHelpPath: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
2018-01-04 19:18:35 -05:00
|
|
|
},
|
2018-06-27 10:28:05 -04:00
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
user() {
|
|
|
|
return this.pipeline.user;
|
2017-05-29 06:02:06 -04:00
|
|
|
},
|
2018-06-27 10:28:05 -04:00
|
|
|
popoverOptions() {
|
|
|
|
return {
|
|
|
|
html: true,
|
|
|
|
trigger: 'focus',
|
|
|
|
placement: 'top',
|
|
|
|
title: `<div class="autodevops-title">
|
2018-01-03 18:14:55 -05:00
|
|
|
This pipeline makes use of a predefined CI/CD configuration enabled by <b>Auto DevOps.</b>
|
|
|
|
</div>`,
|
2018-06-27 10:28:05 -04:00
|
|
|
content: `<a
|
2018-01-03 18:14:55 -05:00
|
|
|
class="autodevops-link"
|
|
|
|
href="${this.autoDevopsHelpPath}"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer nofollow">
|
|
|
|
Learn more about Auto DevOps
|
|
|
|
</a>`,
|
2018-06-27 10:28:05 -04:00
|
|
|
};
|
2017-09-01 05:46:08 -04:00
|
|
|
},
|
2018-06-27 10:28:05 -04:00
|
|
|
},
|
|
|
|
};
|
2017-05-29 06:02:06 -04:00
|
|
|
</script>
|
|
|
|
<template>
|
2018-04-09 17:36:25 -04:00
|
|
|
<div class="table-section section-15 d-none d-sm-none d-md-block pipeline-tags">
|
2017-05-29 06:02:06 -04:00
|
|
|
<a
|
|
|
|
:href="pipeline.path"
|
|
|
|
class="js-pipeline-url-link">
|
2018-01-04 19:18:35 -05:00
|
|
|
<span class="pipeline-id">#{{ pipeline.id }}</span>
|
2017-05-29 06:02:06 -04:00
|
|
|
</a>
|
|
|
|
<span>by</span>
|
|
|
|
<user-avatar-link
|
|
|
|
v-if="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"
|
2018-06-11 05:49:47 -04:00
|
|
|
class="js-pipeline-url-user"
|
2017-05-29 06:02:06 -04:00
|
|
|
/>
|
|
|
|
<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
|
2017-06-06 16:46:31 -04:00
|
|
|
v-tooltip
|
2018-06-11 05:49:47 -04:00
|
|
|
v-if="pipeline.flags.latest"
|
2018-05-22 12:03:52 -04:00
|
|
|
class="js-pipeline-url-latest badge badge-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
|
2017-06-06 16:46:31 -04:00
|
|
|
v-tooltip
|
2018-06-11 05:49:47 -04:00
|
|
|
v-if="pipeline.flags.yaml_errors"
|
|
|
|
:title="pipeline.yaml_errors"
|
|
|
|
class="js-pipeline-url-yaml badge badge-danger">
|
2017-06-16 08:00:28 -04:00
|
|
|
yaml invalid
|
|
|
|
</span>
|
2017-10-03 07:02:48 -04:00
|
|
|
<span
|
|
|
|
v-tooltip
|
2018-06-11 05:49:47 -04:00
|
|
|
v-if="pipeline.flags.failure_reason"
|
|
|
|
:title="pipeline.failure_reason"
|
|
|
|
class="js-pipeline-url-failure badge badge-danger">
|
2017-10-03 07:02:48 -04:00
|
|
|
error
|
|
|
|
</span>
|
2017-09-01 05:46:08 -04:00
|
|
|
<a
|
2018-06-11 05:49:47 -04:00
|
|
|
v-popover="popoverOptions"
|
2017-08-31 07:47:29 -04:00
|
|
|
v-if="pipeline.flags.auto_devops"
|
2017-09-29 09:07:43 -04:00
|
|
|
tabindex="0"
|
2018-05-22 12:03:52 -04:00
|
|
|
class="js-pipeline-url-autodevops badge badge-info autodevops-badge"
|
2017-09-01 09:25:15 -04:00
|
|
|
role="button">
|
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"
|
2018-05-22 12:03:52 -04:00
|
|
|
class="js-pipeline-url-stuck badge badge-warning">
|
2017-06-16 08:00:28 -04:00
|
|
|
stuck
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-05-29 06:02:06 -04:00
|
|
|
</template>
|