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:
Diffstat (limited to 'app/assets/javascripts/environments/components/stop_environment_modal.vue')
-rw-r--r--app/assets/javascripts/environments/components/stop_environment_modal.vue47
1 files changed, 22 insertions, 25 deletions
diff --git a/app/assets/javascripts/environments/components/stop_environment_modal.vue b/app/assets/javascripts/environments/components/stop_environment_modal.vue
index 88612376b6e..892d0b96da1 100644
--- a/app/assets/javascripts/environments/components/stop_environment_modal.vue
+++ b/app/assets/javascripts/environments/components/stop_environment_modal.vue
@@ -1,8 +1,7 @@
<script>
-/* eslint-disable @gitlab/vue-require-i18n-strings, vue/no-v-html */
-import { GlTooltipDirective } from '@gitlab/ui';
+/* eslint-disable @gitlab/vue-require-i18n-strings */
+import { GlSprintf, GlTooltipDirective } from '@gitlab/ui';
import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
-import { s__, sprintf } from '~/locale';
import eventHub from '../event_hub';
export default {
@@ -11,6 +10,7 @@ export default {
components: {
GlModal: DeprecatedModal2,
+ GlSprintf,
},
directives: {
@@ -24,27 +24,6 @@ export default {
},
},
- computed: {
- noStopActionMessage() {
- return sprintf(
- s__(
- `Environments|Note that this action will stop the environment,
- but it will %{emphasisStart}not%{emphasisEnd} have an effect on any existing deployment
- due to no “stop environment action” being defined
- in the %{ciConfigLinkStart}.gitlab-ci.yml%{ciConfigLinkEnd} file.`,
- ),
- {
- emphasisStart: '<strong>',
- emphasisEnd: '</strong>',
- ciConfigLinkStart:
- '<a href="https://docs.gitlab.com/ee/ci/yaml/" target="_blank" rel="noopener noreferrer">',
- ciConfigLinkEnd: '</a>',
- },
- false,
- );
- },
- },
-
methods: {
onSubmit() {
eventHub.$emit('stopEnvironment', this.environment);
@@ -72,7 +51,25 @@ export default {
<p>{{ s__('Environments|Are you sure you want to stop this environment?') }}</p>
<div v-if="!environment.has_stop_action" class="warning_message">
- <p v-html="noStopActionMessage"></p>
+ <p>
+ <gl-sprintf
+ :message="
+ s__(`Environments|Note that this action will stop the environment,
+ but it will %{emphasisStart}not%{emphasisEnd} have an effect on any existing deployment
+ due to no “stop environment action” being defined
+ in the %{ciConfigLinkStart}.gitlab-ci.yml%{ciConfigLinkEnd} file.`)
+ "
+ >
+ <template #emphasis="{ content }">
+ <strong>{{ content }}</strong>
+ </template>
+ <template #ciConfigLink="{ content }">
+ <a href="https://docs.gitlab.com/ee/ci/yaml/" target="_blank" rel="noopener noreferrer">
+ {{ content }}</a
+ >
+ </template>
+ </gl-sprintf>
+ </p>
<a
href="https://docs.gitlab.com/ee/ci/environments.html#stopping-an-environment"
target="_blank"