blob: 33bcee5b34b85078adfa8c274b3f46947ab3eb47 (
plain)
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
|
<script>
import { GlLink } from '@gitlab/ui';
import { RUNNER_EMPTY_TEXT, RUNNER_NO_DESCRIPTION } from '~/pages/admin/jobs/components/constants';
export default {
i18n: {
emptyRunnerText: RUNNER_EMPTY_TEXT,
noRunnerDescription: RUNNER_NO_DESCRIPTION,
},
components: {
GlLink,
},
props: {
job: {
type: Object,
required: true,
},
},
computed: {
adminUrl() {
return this.job.runner?.adminUrl;
},
description() {
return this.job.runner?.description
? this.job.runner.description
: this.$options.i18n.noRunnerDescription;
},
},
};
</script>
<template>
<div class="gl-text-truncate">
<gl-link v-if="adminUrl" :href="adminUrl">
{{ description }}
</gl-link>
<span v-else data-testid="empty-runner-text"> {{ $options.i18n.emptyRunnerText }}</span>
</div>
</template>
|