debian-mirror-gitlab/app/assets/javascripts/admin/dev_ops_report/components/usage_ping_disabled.vue

54 lines
1.2 KiB
Vue
Raw Normal View History

2020-11-24 15:15:51 +05:30
<script>
import { GlEmptyState, GlSprintf, GlLink, GlButton } from '@gitlab/ui';
export default {
components: {
GlEmptyState,
GlSprintf,
GlLink,
GlButton,
},
inject: {
isAdmin: {
2021-01-03 14:25:43 +05:30
default: false,
2020-11-24 15:15:51 +05:30
},
svgPath: {
2021-01-03 14:25:43 +05:30
default: '',
2020-11-24 15:15:51 +05:30
},
docsLink: {
2021-01-03 14:25:43 +05:30
default: '',
2020-11-24 15:15:51 +05:30
},
primaryButtonPath: {
2021-01-03 14:25:43 +05:30
default: '',
2020-11-24 15:15:51 +05:30
},
},
};
</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}.',
)
"
>
2021-03-08 18:12:59 +05:30
<template #docLink="{ content }">
2020-11-24 15:15:51 +05:30
<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>