summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/admin/dev_ops_report/components/usage_ping_disabled.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/admin/dev_ops_report/components/usage_ping_disabled.vue')
-rw-r--r--app/assets/javascripts/admin/dev_ops_report/components/usage_ping_disabled.vue53
1 files changed, 53 insertions, 0 deletions
diff --git a/app/assets/javascripts/admin/dev_ops_report/components/usage_ping_disabled.vue b/app/assets/javascripts/admin/dev_ops_report/components/usage_ping_disabled.vue
new file mode 100644
index 00000000000..5429ec403d3
--- /dev/null
+++ b/app/assets/javascripts/admin/dev_ops_report/components/usage_ping_disabled.vue
@@ -0,0 +1,53 @@
+<script>
+import { GlEmptyState, GlSprintf, GlLink, GlButton } from '@gitlab/ui';
+
+export default {
+ components: {
+ GlEmptyState,
+ GlSprintf,
+ GlLink,
+ GlButton,
+ },
+ inject: {
+ isAdmin: {
+ type: Boolean,
+ },
+ svgPath: {
+ type: String,
+ },
+ docsLink: {
+ type: String,
+ },
+ primaryButtonPath: {
+ type: String,
+ },
+ },
+};
+</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>