diff options
Diffstat (limited to 'app/assets/javascripts/serverless/components/empty_state.vue')
-rw-r--r-- | app/assets/javascripts/serverless/components/empty_state.vue | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/app/assets/javascripts/serverless/components/empty_state.vue b/app/assets/javascripts/serverless/components/empty_state.vue index 8a5ed9debb3..6d1cea519c4 100644 --- a/app/assets/javascripts/serverless/components/empty_state.vue +++ b/app/assets/javascripts/serverless/components/empty_state.vue @@ -1,6 +1,8 @@ <script> import { GlEmptyState, GlLink, GlSprintf } from '@gitlab/ui'; import { mapState } from 'vuex'; +import { s__ } from '~/locale'; +import { DEPRECATION_POST_LINK } from '../constants'; export default { components: { @@ -8,6 +10,13 @@ export default { GlLink, GlSprintf, }, + i18n: { + title: s__('Serverless|Getting started with serverless'), + description: s__( + 'Serverless|Serverless was %{postLinkStart}deprecated%{postLinkEnd}. But if you opt to use it, you must install Knative in your Kubernetes cluster first. %{linkStart}Learn more.%{linkEnd}', + ), + }, + deprecationPostLink: DEPRECATION_POST_LINK, computed: { ...mapState(['emptyImagePath', 'helpPath']), }, @@ -15,18 +24,12 @@ export default { </script> <template> - <gl-empty-state - :svg-path="emptyImagePath" - :title="s__('Serverless|Getting started with serverless')" - > + <gl-empty-state :svg-path="emptyImagePath" :title="$options.i18n.title"> <template #description> - <gl-sprintf - :message=" - s__( - 'Serverless|In order to start using functions as a service, you must first install Knative on your Kubernetes cluster. %{linkStart}More information%{linkEnd}', - ) - " - > + <gl-sprintf :message="$options.i18n.description"> + <template #postLink="{ content }"> + <gl-link :href="$options.deprecationPostLink" target="_blank">{{ content }}</gl-link> + </template> <template #link="{ content }"> <gl-link :href="helpPath">{{ content }}</gl-link> </template> |