2018-11-20 20:47:30 +05:30
|
|
|
<script>
|
2020-03-13 15:44:24 +05:30
|
|
|
import { isEmpty } from 'lodash';
|
2019-02-15 15:39:39 +05:30
|
|
|
import { GlLink } from '@gitlab/ui';
|
2018-12-13 13:39:08 +05:30
|
|
|
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() {
|
2020-03-13 15:44:24 +05:30
|
|
|
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">
|
2019-02-15 15:39:39 +05:30
|
|
|
{{ s__('Job|Job has been erased by') }}
|
|
|
|
<gl-link :href="user.web_url"> {{ user.username }} </gl-link>
|
2018-11-20 20:47:30 +05:30
|
|
|
</template>
|
|
|
|
<template v-else>
|
2019-02-15 15:39:39 +05:30
|
|
|
{{ s__('Job|Job has been erased') }}
|
2018-11-20 20:47:30 +05:30
|
|
|
</template>
|
|
|
|
|
2019-02-15 15:39:39 +05:30
|
|
|
<timeago-tooltip :time="erasedAt" />
|
2018-11-20 20:47:30 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|