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

expiration_interval_description.vue « components « runner_token_expiration « application_settings « admin « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2f74b44625f60ca70103a1007c29cf20dacc03dc (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
<script>
import { GlLink, GlSprintf } from '@gitlab/ui';
import { helpPagePath } from '~/helpers/help_page_helper';
import { s__ } from '~/locale';

export default {
  components: {
    GlLink,
    GlSprintf,
  },
  props: {
    message: {
      type: String,
      required: true,
    },
  },
  i18n: {
    fieldHelpText: s__(
      'AdminSettings|If no unit is written, it defaults to seconds. For example, these are all equivalent: %{oneDayInSeconds}, %{oneDayInHoursHumanReadable}, or %{oneDayHumanReadable}. Minimum value is two hours. %{linkStart}Learn more.%{linkEnd}',
    ),
  },
  computed: {
    helpUrl() {
      return helpPagePath('ci/runners/configure_runners', {
        anchor: 'authentication-token-security',
      });
    },
  },
};
</script>
<template>
  <p>
    {{ message }}
    <gl-sprintf :message="$options.i18n.fieldHelpText">
      <template #oneDayInSeconds>
        <!-- eslint-disable-next-line @gitlab/vue-require-i18n-strings -->
        <code>86400</code>
      </template>
      <template #oneDayInHoursHumanReadable>
        <!-- eslint-disable-next-line @gitlab/vue-require-i18n-strings -->
        <code>24 hours</code>
      </template>
      <template #oneDayHumanReadable>
        <!-- eslint-disable-next-line @gitlab/vue-require-i18n-strings -->
        <code>1 day</code>
      </template>
      <template #link>
        <gl-link :href="helpUrl" target="_blank">{{ __('Learn more.') }}</gl-link>
      </template>
    </gl-sprintf>
  </p>
</template>