debian-mirror-gitlab/app/assets/javascripts/analytics/devops_reports/components/service_ping_disabled.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.3 KiB
Vue
Raw Normal View History

2020-11-24 15:15:51 +05:30
<script>
import { GlEmptyState, GlSprintf, GlLink, GlButton } from '@gitlab/ui';
2021-10-27 15:23:28 +05:30
import { helpPagePath } from '~/helpers/help_page_helper';
2020-11-24 15:15:51 +05:30
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
},
primaryButtonPath: {
2021-01-03 14:25:43 +05:30
default: '',
2020-11-24 15:15:51 +05:30
},
},
2021-10-27 15:23:28 +05:30
docsLink: helpPagePath('development/service_ping/index.md'),
2020-11-24 15:15:51 +05:30
};
</script>
<template>
2021-09-30 23:02:18 +05:30
<gl-empty-state :title="s__('ServicePing|Service ping is off')" :svg-path="svgPath">
2020-11-24 15:15:51 +05:30
<template #description>
<gl-sprintf
v-if="!isAdmin"
:message="
2021-09-30 23:02:18 +05:30
s__(
'ServicePing|To view instance-level analytics, ask an admin to turn on %{docLinkStart}service ping%{docLinkEnd}.',
2020-11-24 15:15:51 +05:30
)
"
>
2021-03-08 18:12:59 +05:30
<template #docLink="{ content }">
2021-10-27 15:23:28 +05:30
<gl-link :href="$options.docsLink" target="_blank">{{ content }}</gl-link>
2020-11-24 15:15:51 +05:30
</template>
</gl-sprintf>
2021-09-30 23:02:18 +05:30
<template v-else>
<p>
{{ s__('ServicePing|Turn on service ping to review instance-level analytics.') }}
2020-11-24 15:15:51 +05:30
</p>
2022-06-21 17:19:12 +05:30
<gl-button category="primary" variant="confirm" :href="primaryButtonPath">
2021-09-30 23:02:18 +05:30
{{ s__('ServicePing|Turn on service ping') }}
</gl-button>
2020-11-24 15:15:51 +05:30
</template>
</template>
</gl-empty-state>
</template>