summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/environments/components/environment_monitoring.vue
blob: bd6feb14319ebcd55d918d7c85ff7235f096cb77 (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
<script>
import { GlDeprecatedButton, GlTooltipDirective } from '@gitlab/ui';
import { __ } from '~/locale';
/**
 * Renders the Monitoring (Metrics) link in environments table.
 */
import Icon from '~/vue_shared/components/icon.vue';

export default {
  components: {
    Icon,
    GlDeprecatedButton,
  },
  directives: {
    GlTooltip: GlTooltipDirective,
  },
  props: {
    monitoringUrl: {
      type: String,
      required: true,
    },
  },
  computed: {
    title() {
      return __('Monitoring');
    },
  },
};
</script>
<template>
  <gl-deprecated-button
    v-gl-tooltip
    :href="monitoringUrl"
    :title="title"
    :aria-label="title"
    class="monitoring-url d-none d-sm-none d-md-block"
    rel="noopener noreferrer nofollow"
    variant="default"
  >
    <icon name="chart" />
  </gl-deprecated-button>
</template>