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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
<script>
import AWS_LOGO_URL from '@gitlab/svgs/dist/illustrations/logos/aws.svg?url';
import DOCKER_LOGO_URL from '@gitlab/svgs/dist/illustrations/third-party-logos/ci_cd-template-logos/docker.png';
import KUBERNETES_LOGO_URL from '@gitlab/svgs/dist/illustrations/logos/kubernetes.svg?url';
import { GlFormRadioGroup, GlIcon, GlLink } from '@gitlab/ui';
import {
LINUX_PLATFORM,
MACOS_PLATFORM,
WINDOWS_PLATFORM,
AWS_PLATFORM,
DOCKER_HELP_URL,
KUBERNETES_HELP_URL,
} from '../constants';
import RunnerPlatformsRadio from './runner_platforms_radio.vue';
export default {
components: {
GlFormRadioGroup,
GlLink,
GlIcon,
RunnerPlatformsRadio,
},
props: {
value: {
type: String,
required: false,
default: null,
},
},
data() {
return {
model: this.value,
};
},
watch: {
model() {
this.$emit('input', this.model);
},
},
LINUX_PLATFORM,
MACOS_PLATFORM,
WINDOWS_PLATFORM,
AWS_PLATFORM,
AWS_LOGO_URL,
DOCKER_HELP_URL,
DOCKER_LOGO_URL,
KUBERNETES_HELP_URL,
KUBERNETES_LOGO_URL,
};
</script>
<template>
<gl-form-radio-group v-model="model">
<div class="gl-mt-3 gl-mb-6">
<label>{{ s__('Runners|Operating systems') }}</label>
<div class="gl-display-flex gl-flex-wrap gl-gap-5">
<!-- eslint-disable @gitlab/vue-require-i18n-strings -->
<runner-platforms-radio v-model="model" :value="$options.LINUX_PLATFORM">
Linux
</runner-platforms-radio>
<runner-platforms-radio v-model="model" :value="$options.MACOS_PLATFORM">
macOS
</runner-platforms-radio>
<runner-platforms-radio v-model="model" :value="$options.WINDOWS_PLATFORM">
Windows
</runner-platforms-radio>
</div>
</div>
<div class="gl-mt-3 gl-mb-6">
<label>{{ s__('Runners|Cloud templates') }}</label>
<!-- eslint-disable @gitlab/vue-require-i18n-strings -->
<div class="gl-display-flex gl-flex-wrap gl-gap-5">
<runner-platforms-radio
v-model="model"
:image="$options.AWS_LOGO_URL"
:value="$options.AWS_PLATFORM"
>
AWS
</runner-platforms-radio>
</div>
</div>
<div class="gl-mt-3 gl-mb-6">
<label>{{ s__('Runners|Containers') }}</label>
<div class="gl-display-flex gl-flex-wrap gl-gap-5">
<!-- eslint-disable @gitlab/vue-require-i18n-strings -->
<runner-platforms-radio :image="$options.DOCKER_LOGO_URL">
<gl-link :href="$options.DOCKER_HELP_URL" target="_blank">
Docker
<gl-icon name="external-link" />
</gl-link>
</runner-platforms-radio>
<runner-platforms-radio :image="$options.KUBERNETES_LOGO_URL">
<gl-link :href="$options.KUBERNETES_HELP_URL" target="_blank">
Kubernetes
<gl-icon name="external-link" />
</gl-link>
</runner-platforms-radio>
</div>
</div>
</gl-form-radio-group>
</template>
|