2018-08-13 06:38:58 -04:00
|
|
|
<script>
|
2018-10-10 02:23:54 -04:00
|
|
|
import _ from 'underscore';
|
2018-11-16 14:29:11 -05:00
|
|
|
import { GlLink } from '@gitlab/ui';
|
2018-10-10 02:23:54 -04:00
|
|
|
import TimeagoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
|
2018-08-13 06:38:58 -04:00
|
|
|
|
2018-10-10 02:23:54 -04:00
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
TimeagoTooltip,
|
2018-11-02 13:15:56 -04:00
|
|
|
GlLink,
|
2018-10-10 02:23:54 -04:00
|
|
|
},
|
|
|
|
props: {
|
|
|
|
user: {
|
|
|
|
type: Object,
|
|
|
|
required: false,
|
|
|
|
default: () => ({}),
|
2018-08-13 06:38:58 -04:00
|
|
|
},
|
2018-10-10 02:23:54 -04:00
|
|
|
erasedAt: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
2018-08-13 06:38:58 -04:00
|
|
|
},
|
2018-10-10 02:23:54 -04:00
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
isErasedByUser() {
|
|
|
|
return !_.isEmpty(this.user);
|
2018-08-13 06:38:58 -04:00
|
|
|
},
|
2018-10-10 02:23:54 -04:00
|
|
|
},
|
|
|
|
};
|
2018-08-13 06:38:58 -04:00
|
|
|
</script>
|
|
|
|
<template>
|
|
|
|
<div class="prepend-top-default js-build-erased">
|
|
|
|
<div class="erased alert alert-warning">
|
2018-09-27 07:08:31 -04:00
|
|
|
<template v-if="isErasedByUser">
|
2018-11-16 15:07:38 -05:00
|
|
|
{{ s__('Job|Job has been erased by') }}
|
|
|
|
<gl-link :href="user.web_url"> {{ user.username }} </gl-link>
|
2018-08-13 06:38:58 -04:00
|
|
|
</template>
|
|
|
|
<template v-else>
|
2018-11-16 15:07:38 -05:00
|
|
|
{{ s__('Job|Job has been erased') }}
|
2018-08-13 06:38:58 -04:00
|
|
|
</template>
|
2018-08-13 11:52:42 -04:00
|
|
|
|
2018-11-16 15:07:38 -05:00
|
|
|
<timeago-tooltip :time="erasedAt" />
|
2018-08-13 06:38:58 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|