summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/admin/dev_ops_report/components/usage_ping_disabled.vue
blob: 316827e1b0766138cd146df6c692243a16eb7433 (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
<script>
import { GlEmptyState, GlSprintf, GlLink, GlButton } from '@gitlab/ui';

export default {
  components: {
    GlEmptyState,
    GlSprintf,
    GlLink,
    GlButton,
  },
  inject: {
    isAdmin: {
      default: false,
    },
    svgPath: {
      default: '',
    },
    docsLink: {
      default: '',
    },
    primaryButtonPath: {
      default: '',
    },
  },
};
</script>
<template>
  <gl-empty-state class="js-empty-state" :title="__('Usage ping is off')" :svg-path="svgPath">
    <template #description>
      <gl-sprintf
        v-if="!isAdmin"
        :message="
          __(
            'To view instance-level analytics, ask an admin to turn on %{docLinkStart}usage ping%{docLinkEnd}.',
          )
        "
      >
        <template #docLink="{content}">
          <gl-link :href="docsLink" target="_blank">{{ content }}</gl-link>
        </template>
      </gl-sprintf>
      <template v-else
        ><p>
          {{ __('Turn on usage ping to review instance-level analytics.') }}
        </p>

        <gl-button category="primary" variant="success" :href="primaryButtonPath">
          {{ __('Turn on usage ping') }}</gl-button
        >
      </template>
    </template>
  </gl-empty-state>
</template>