diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /app/assets/javascripts/self_monitor | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'app/assets/javascripts/self_monitor')
-rw-r--r-- | app/assets/javascripts/self_monitor/components/self_monitor_form.vue | 36 | ||||
-rw-r--r-- | app/assets/javascripts/self_monitor/store/actions.js | 4 |
2 files changed, 28 insertions, 12 deletions
diff --git a/app/assets/javascripts/self_monitor/components/self_monitor_form.vue b/app/assets/javascripts/self_monitor/components/self_monitor_form.vue index 4c1f0d892af..2f31d8ef3fb 100644 --- a/app/assets/javascripts/self_monitor/components/self_monitor_form.vue +++ b/app/assets/javascripts/self_monitor/components/self_monitor_form.vue @@ -1,8 +1,16 @@ <script> -/* eslint-disable vue/no-v-html */ -import { GlFormGroup, GlButton, GlModal, GlToast, GlToggle } from '@gitlab/ui'; +import { + GlFormGroup, + GlButton, + GlModal, + GlToast, + GlToggle, + GlLink, + GlSafeHtmlDirective, +} from '@gitlab/ui'; import Vue from 'vue'; import { mapState, mapActions } from 'vuex'; +import { helpPagePath } from '~/helpers/help_page_helper'; import { BV_SHOW_MODAL, BV_HIDE_MODAL } from '~/lib/utils/constants'; import { visitUrl, getBaseURL } from '~/lib/utils/url_utility'; import { __, s__, sprintf } from '~/locale'; @@ -15,9 +23,13 @@ export default { GlButton, GlModal, GlToggle, + GlLink, + }, + directives: { + SafeHtml: GlSafeHtmlDirective, }, formLabels: { - createProject: __('Create Project'), + createProject: __('Self monitoring'), }, data() { return { @@ -48,7 +60,7 @@ export default { if (this.projectCreated) { return sprintf( s__( - 'SelfMonitoring|Enabling this feature creates a %{projectLinkStart}project%{projectLinkEnd} that can be used to monitor the health of your instance.', + 'SelfMonitoring|Self monitoring is active. Use the %{projectLinkStart}self monitoring project%{projectLinkEnd} to monitor the health of your instance.', ), { projectLinkStart: `<a href="${this.selfMonitorProjectFullUrl}">`, @@ -59,9 +71,12 @@ export default { } return s__( - 'SelfMonitoring|Enabling this feature creates a project that can be used to monitor the health of your instance.', + 'SelfMonitoring|Activate self monitoring to create a project to use to monitor the health of your instance.', ); }, + helpDocsPath() { + return helpPagePath('administration/monitoring/gitlab_self_monitoring_project/index'); + }, }, watch: { selfMonitorEnabled() { @@ -126,12 +141,13 @@ export default { </h4> <gl-button class="js-settings-toggle">{{ __('Expand') }}</gl-button> <p class="js-section-sub-header"> - {{ s__('SelfMonitoring|Enable or disable instance self monitoring') }} + {{ s__('SelfMonitoring|Activate or deactivate instance self monitoring.') }} + <gl-link :href="helpDocsPath">{{ __('Learn more.') }}</gl-link> </p> </div> <div class="settings-content"> <form name="self-monitoring-form"> - <p ref="selfMonitoringFormText" v-html="selfMonitoringFormText"></p> + <p ref="selfMonitoringFormText" v-safe-html="selfMonitoringFormText"></p> <gl-form-group> <gl-toggle v-model="selfMonitorEnabled" @@ -142,9 +158,9 @@ export default { </form> </div> <gl-modal - :title="s__('SelfMonitoring|Disable self monitoring?')" + :title="s__('SelfMonitoring|Deactivate self monitoring?')" :modal-id="modalId" - :ok-title="__('Delete project')" + :ok-title="__('Delete self monitoring project')" :cancel-title="__('Cancel')" ok-variant="danger" category="primary" @@ -154,7 +170,7 @@ export default { <div> {{ s__( - 'SelfMonitoring|Disabling this feature will delete the self monitoring project. Are you sure you want to delete the project?', + 'SelfMonitoring|Deactivating self monitoring deletes the self monitoring project. Are you sure you want to deactivate self monitoring and delete the project?', ) }} </div> diff --git a/app/assets/javascripts/self_monitor/store/actions.js b/app/assets/javascripts/self_monitor/store/actions.js index 670ee547b02..f37b654b00a 100644 --- a/app/assets/javascripts/self_monitor/store/actions.js +++ b/app/assets/javascripts/self_monitor/store/actions.js @@ -56,7 +56,7 @@ export const requestCreateProjectSuccess = ({ commit, dispatch }, selfMonitorDat commit(types.SET_LOADING, false); commit(types.SET_PROJECT_URL, selfMonitorData.project_full_path); commit(types.SET_ALERT_CONTENT, { - message: s__('SelfMonitoring|Self monitoring project has been successfully created.'), + message: s__('SelfMonitoring|Self monitoring project successfully created.'), actionText: __('View project'), actionName: 'viewSelfMonitorProject', }); @@ -108,7 +108,7 @@ export const requestDeleteProjectSuccess = ({ commit }) => { commit(types.SET_PROJECT_URL, ''); commit(types.SET_PROJECT_CREATED, false); commit(types.SET_ALERT_CONTENT, { - message: s__('SelfMonitoring|Self monitoring project has been successfully deleted.'), + message: s__('SelfMonitoring|Self monitoring project successfully deleted.'), actionText: __('Undo'), actionName: 'createProject', }); |