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

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

export default {
  components: {
    GlAlert,
    GlLink,
    GlSprintf,
  },
  inject: ['hasManagedPrometheus'],
  i18n: {
    alertsDeprecationText: s__(
      'Metrics|GitLab-managed Prometheus is deprecated and %{linkStart}scheduled for removal%{linkEnd}. Following this removal, your existing alerts will continue to function as part of the new cluster integration. However, you will no longer be able to add new alerts or edit existing alerts from the metrics dashboard.',
    ),
  },
  methods: {
    helpPagePath,
  },
};
</script>

<template>
  <gl-alert
    v-if="hasManagedPrometheus"
    variant="warning"
    class="my-2"
    data-testid="alerts-deprecation-warning"
  >
    <gl-sprintf :message="$options.i18n.alertsDeprecationText">
      <template #link="{ content }">
        <gl-link
          :href="
            helpPagePath('operations/metrics/alerts.html', {
              anchor: 'managed-prometheus-instances',
            })
          "
          target="_blank"
        >
          <span>{{ content }}</span>
        </gl-link>
      </template>
    </gl-sprintf>
  </gl-alert>
</template>