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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
<script>
import { GlIcon, GlLink } from '@gitlab/ui';
export default {
name: 'SidebarDetailRow',
components: {
GlIcon,
GlLink,
},
props: {
title: {
type: String,
required: false,
default: '',
},
value: {
type: String,
required: true,
},
helpUrl: {
type: String,
required: false,
default: '',
},
path: {
type: String,
required: false,
default: '',
},
},
computed: {
hasTitle() {
return this.title.length > 0;
},
hasHelpURL() {
return this.helpUrl.length > 0;
},
},
};
</script>
<template>
<p class="build-sidebar-item gl-mb-2">
<b v-if="hasTitle" class="gl-display-flex">{{ title }}:</b>
<gl-link
v-if="path"
:href="path"
class="gl-text-blue-600!"
data-testid="job-sidebar-value-link"
>
{{ value }}
</gl-link>
<span v-else
>{{ value }}
<gl-link
v-if="hasHelpURL"
:href="helpUrl"
target="_blank"
data-testid="job-sidebar-help-link"
>
<gl-icon name="question-o" class="gl-ml-2 gl-text-blue-500" />
</gl-link>
</span>
</p>
</template>
|