1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
<script>
import { isEmpty } from 'lodash';
import { GlAlert, GlLink, GlSprintf } from '@gitlab/ui';
import TimeagoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
export default {
components: {
GlAlert,
GlLink,
GlSprintf,
TimeagoTooltip,
},
props: {
user: {
type: Object,
required: false,
default: () => ({}),
},
erasedAt: {
type: String,
required: true,
},
},
computed: {
isErasedByUser() {
return !isEmpty(this.user);
},
},
};
</script>
<template>
<div class="gl-mt-3">
<gl-alert variant="warning" :dismissible="false">
<template v-if="isErasedByUser">
<gl-sprintf :message="s__('Job|Job has been erased by %{userLink}')">
<template #userLink>
<gl-link :href="user.web_url" target="_blank">{{ user.username }}</gl-link>
</template>
</gl-sprintf>
</template>
<template v-else>
{{ s__('Job|Job has been erased') }}
</template>
<timeago-tooltip :time="erasedAt" />
</gl-alert>
</div>
</template>
|