Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-13 12:09:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-13 12:09:42 +0300
commit8ce82c1eaf87d1b22b645e2c37671f01d2c35581 (patch)
treec6dc06ec31b343d3f9531846c7fa6ff41087b213 /app/assets/javascripts/analytics
parent63d4054f263da695a7fd90202e33d2c5392572a2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/analytics')
-rw-r--r--app/assets/javascripts/analytics/devops_report/components/service_ping_disabled.vue (renamed from app/assets/javascripts/analytics/devops_report/components/usage_ping_disabled.vue)23
-rw-r--r--app/assets/javascripts/analytics/devops_report/devops_score_disabled_service_ping.js (renamed from app/assets/javascripts/analytics/devops_report/devops_score_disabled_usage_ping.js)18
2 files changed, 26 insertions, 15 deletions
diff --git a/app/assets/javascripts/analytics/devops_report/components/usage_ping_disabled.vue b/app/assets/javascripts/analytics/devops_report/components/service_ping_disabled.vue
index c0ad814172d..7c14cf3767f 100644
--- a/app/assets/javascripts/analytics/devops_report/components/usage_ping_disabled.vue
+++ b/app/assets/javascripts/analytics/devops_report/components/service_ping_disabled.vue
@@ -25,28 +25,33 @@ export default {
};
</script>
<template>
- <gl-empty-state class="js-empty-state" :title="__('Usage ping is off')" :svg-path="svgPath">
+ <gl-empty-state :title="s__('ServicePing|Service 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}.',
+ s__(
+ 'ServicePing|To view instance-level analytics, ask an admin to turn on %{docLinkStart}service ping%{docLinkEnd}.',
)
"
>
<template #docLink="{ content }">
- <gl-link :href="docsLink" target="_blank">{{ content }}</gl-link>
+ <gl-link :href="docsLink" target="_blank" data-testid="docs-link">{{ content }}</gl-link>
</template>
</gl-sprintf>
- <template v-else
- ><p>
- {{ __('Turn on usage ping to review instance-level analytics.') }}
+ <template v-else>
+ <p>
+ {{ s__('ServicePing|Turn on service ping to review instance-level analytics.') }}
</p>
- <gl-button category="primary" variant="success" :href="primaryButtonPath">
- {{ __('Turn on usage ping') }}</gl-button
+ <gl-button
+ category="primary"
+ variant="success"
+ :href="primaryButtonPath"
+ data-testid="power-on-button"
>
+ {{ s__('ServicePing|Turn on service ping') }}
+ </gl-button>
</template>
</template>
</gl-empty-state>
diff --git a/app/assets/javascripts/analytics/devops_report/devops_score_disabled_usage_ping.js b/app/assets/javascripts/analytics/devops_report/devops_score_disabled_service_ping.js
index 0131407e723..63b36f35247 100644
--- a/app/assets/javascripts/analytics/devops_report/devops_score_disabled_usage_ping.js
+++ b/app/assets/javascripts/analytics/devops_report/devops_score_disabled_service_ping.js
@@ -1,27 +1,33 @@
import Vue from 'vue';
+import { parseBoolean } from '~/lib/utils/common_utils';
import UserCallout from '~/user_callout';
-import UsagePingDisabled from './components/usage_ping_disabled.vue';
+import ServicePingDisabled from './components/service_ping_disabled.vue';
export default () => {
// eslint-disable-next-line no-new
new UserCallout();
- const emptyStateContainer = document.getElementById('js-devops-usage-ping-disabled');
+ const emptyStateContainer = document.getElementById('js-devops-service-ping-disabled');
if (!emptyStateContainer) return false;
- const { emptyStateSvgPath, enableUsagePingLink, docsLink, isAdmin } = emptyStateContainer.dataset;
+ const {
+ isAdmin,
+ emptyStateSvgPath,
+ enableServicePingPath,
+ docsLink,
+ } = emptyStateContainer.dataset;
return new Vue({
el: emptyStateContainer,
provide: {
- isAdmin: Boolean(isAdmin),
+ isAdmin: parseBoolean(isAdmin),
svgPath: emptyStateSvgPath,
- primaryButtonPath: enableUsagePingLink,
+ primaryButtonPath: enableServicePingPath,
docsLink,
},
render(h) {
- return h(UsagePingDisabled);
+ return h(ServicePingDisabled);
},
});
};