Welcome to mirror list, hosted at ThFree Co, Russian Federation.

image_item.vue « accordion_items « job_assistant_drawer « components « pipeline_editor « ci « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2c27b66f108301a58db66d7329e53a045799fb2c (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
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
<script>
import {
  GlFormGroup,
  GlAccordionItem,
  GlFormInput,
  GlFormTextarea,
  GlLink,
  GlSprintf,
} from '@gitlab/ui';
import { i18n, HELP_PATHS } from '../constants';

export default {
  i18n,
  helpPath: HELP_PATHS.imageHelpPath,
  placeholderText: i18n.ENTRYPOINT_PLACEHOLDER_TEXT,
  components: {
    GlAccordionItem,
    GlFormInput,
    GlFormTextarea,
    GlFormGroup,
    GlLink,
    GlSprintf,
  },
  props: {
    job: {
      type: Object,
      required: true,
    },
  },
  computed: {
    imageEntryPoint() {
      return this.job.image.entrypoint.join('\n');
    },
  },
};
</script>
<template>
  <gl-accordion-item :title="$options.i18n.IMAGE">
    <div class="gl-pb-5">
      <gl-sprintf :message="$options.i18n.IMAGE_DESCRIPTION">
        <template #link="{ content }">
          <gl-link :href="$options.helpPath">{{ content }}</gl-link>
        </template>
      </gl-sprintf>
    </div>
    <gl-form-group :label="$options.i18n.IMAGE_NAME">
      <gl-form-input
        :value="job.image.name"
        data-testid="image-name-input"
        @input="$emit('update-job', 'image.name', $event)"
      />
    </gl-form-group>
    <gl-form-group
      :label="$options.i18n.IMAGE_ENTRYPOINT"
      :description="$options.i18n.ARRAY_FIELD_DESCRIPTION"
      class="gl-mb-0"
    >
      <gl-form-textarea
        :no-resize="false"
        :placeholder="$options.placeholderText"
        data-testid="image-entrypoint-input"
        :value="imageEntryPoint"
        @input="$emit('update-job', 'image.entrypoint', $event.split('\n'))"
      />
    </gl-form-group>
  </gl-accordion-item>
</template>