2018-11-20 20:47:30 +05:30
|
|
|
<script>
|
2018-12-13 13:39:08 +05:30
|
|
|
import _ from 'underscore';
|
|
|
|
import { GlLink } from '@gitlab-org/gitlab-ui';
|
|
|
|
import TimeagoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
|
2018-11-20 20:47:30 +05:30
|
|
|
|
2018-12-13 13:39:08 +05:30
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
TimeagoTooltip,
|
|
|
|
GlLink,
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
user: {
|
|
|
|
type: Object,
|
|
|
|
required: false,
|
|
|
|
default: () => ({}),
|
2018-11-20 20:47:30 +05:30
|
|
|
},
|
2018-12-13 13:39:08 +05:30
|
|
|
erasedAt: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
2018-11-20 20:47:30 +05:30
|
|
|
},
|
2018-12-13 13:39:08 +05:30
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
isErasedByUser() {
|
|
|
|
return !_.isEmpty(this.user);
|
2018-11-20 20:47:30 +05:30
|
|
|
},
|
2018-12-13 13:39:08 +05:30
|
|
|
},
|
|
|
|
};
|
2018-11-20 20:47:30 +05:30
|
|
|
</script>
|
|
|
|
<template>
|
|
|
|
<div class="prepend-top-default js-build-erased">
|
|
|
|
<div class="erased alert alert-warning">
|
2018-12-05 23:21:45 +05:30
|
|
|
<template v-if="isErasedByUser">
|
2018-11-20 20:47:30 +05:30
|
|
|
{{ s__("Job|Job has been erased by") }}
|
2018-12-13 13:39:08 +05:30
|
|
|
<gl-link :href="user.web_url">
|
2018-12-05 23:21:45 +05:30
|
|
|
{{ user.username }}
|
2018-12-13 13:39:08 +05:30
|
|
|
</gl-link>
|
2018-11-20 20:47:30 +05:30
|
|
|
</template>
|
|
|
|
<template v-else>
|
|
|
|
{{ s__("Job|Job has been erased") }}
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<timeago-tooltip
|
|
|
|
:time="erasedAt"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|