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
|
<script>
import { GlSprintf, GlLink, GlModalDirective } from '@gitlab/ui';
import RunnerInstructionsModal from '~/vue_shared/components/runner_instructions/runner_instructions_modal.vue';
import RunnerPlatformsRadioGroup from '~/ci/runner/components/runner_platforms_radio_group.vue';
import RunnerFormFields from '~/ci/runner/components/runner_form_fields.vue';
import { DEFAULT_PLATFORM, DEFAULT_ACCESS_LEVEL } from '../constants';
export default {
name: 'AdminNewRunnerApp',
components: {
GlLink,
GlSprintf,
RunnerInstructionsModal,
RunnerPlatformsRadioGroup,
RunnerFormFields,
},
directives: {
GlModal: GlModalDirective,
},
props: {
legacyRegistrationToken: {
type: String,
required: true,
},
},
data() {
return {
platform: DEFAULT_PLATFORM,
runner: {
description: '',
maintenanceNote: '',
paused: false,
accessLevel: DEFAULT_ACCESS_LEVEL,
runUntagged: false,
tagList: '',
maximumTimeout: ' ',
},
};
},
modalId: 'runners-legacy-registration-instructions-modal',
};
</script>
<template>
<div>
<h1 class="gl-font-size-h2">{{ s__('Runners|New instance runner') }}</h1>
<p>
<gl-sprintf
:message="
s__(
'Runners|Create an instance runner to generate a command that registers the runner with all its configurations. %{linkStart}Prefer to use a registration token to create a runner?%{linkEnd}',
)
"
>
<template #link="{ content }">
<gl-link v-gl-modal="$options.modalId" data-testid="legacy-instructions-link">{{
content
}}</gl-link>
<runner-instructions-modal
:modal-id="$options.modalId"
:registration-token="legacyRegistrationToken"
/>
</template>
</gl-sprintf>
</p>
<hr aria-hidden="true" />
<h2 class="gl-font-weight-normal gl-font-lg gl-my-5">
{{ s__('Runners|Platform') }}
</h2>
<runner-platforms-radio-group v-model="platform" />
<hr aria-hidden="true" />
<runner-form-fields v-model="runner" />
</div>
</template>
|