Commit 2d436941 authored by Phil Hughes's avatar Phil Hughes

Merge branch '207322-use-gl-sprintf' into 'master'

Use gl-sprintf for Kubernetes application description strings

See merge request gitlab-org/gitlab!33270
parents ff5dc44f e927618b
<script> <script>
import { escape } from 'lodash'; import { escape } from 'lodash';
import helmInstallIllustration from '@gitlab/svgs/dist/illustrations/kubernetes-installation.svg'; import helmInstallIllustration from '@gitlab/svgs/dist/illustrations/kubernetes-installation.svg';
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon, GlSprintf, GlLink } from '@gitlab/ui';
import gitlabLogo from 'images/cluster_app_logos/gitlab.png'; import gitlabLogo from 'images/cluster_app_logos/gitlab.png';
import helmLogo from 'images/cluster_app_logos/helm.png'; import helmLogo from 'images/cluster_app_logos/helm.png';
import jupyterhubLogo from 'images/cluster_app_logos/jupyterhub.png'; import jupyterhubLogo from 'images/cluster_app_logos/jupyterhub.png';
...@@ -27,6 +27,8 @@ export default { ...@@ -27,6 +27,8 @@ export default {
applicationRow, applicationRow,
clipboardButton, clipboardButton,
GlLoadingIcon, GlLoadingIcon,
GlSprintf,
GlLink,
KnativeDomainEditor, KnativeDomainEditor,
CrossplaneProviderStack, CrossplaneProviderStack,
IngressModsecuritySettings, IngressModsecuritySettings,
...@@ -112,72 +114,6 @@ export default { ...@@ -112,72 +114,6 @@ export default {
certManagerInstalled() { certManagerInstalled() {
return this.applications.cert_manager.status === APPLICATION_STATUS.INSTALLED; return this.applications.cert_manager.status === APPLICATION_STATUS.INSTALLED;
}, },
ingressDescription() {
return sprintf(
escape(
s__(
`ClusterIntegration|Installing Ingress may incur additional costs. Learn more about %{pricingLink}.`,
),
),
{
pricingLink: `<a href="https://cloud.google.com/compute/pricing#lb"
target="_blank" rel="noopener noreferrer">
${escape(s__('ClusterIntegration|pricing'))}</a>`,
},
false,
);
},
certManagerDescription() {
return sprintf(
escape(
s__(
`ClusterIntegration|Cert-Manager is a native Kubernetes certificate management controller that helps with issuing certificates.
Installing Cert-Manager on your cluster will issue a certificate by %{letsEncrypt} and ensure that certificates
are valid and up-to-date.`,
),
),
{
letsEncrypt: `<a href="https://letsencrypt.org/"
target="_blank" rel="noopener noreferrer">
${escape(s__("ClusterIntegration|Let's Encrypt"))}</a>`,
},
false,
);
},
crossplaneDescription() {
return sprintf(
escape(
s__(
`ClusterIntegration|Crossplane enables declarative provisioning of managed services from your cloud of choice using %{kubectl} or %{gitlabIntegrationLink}.
Crossplane runs inside your Kubernetes cluster and supports secure connectivity and secrets management between app containers and the cloud services they depend on.`,
),
),
{
gitlabIntegrationLink: `<a href="https://docs.gitlab.com/ee/user/clusters/applications.html#crossplane"
target="_blank" rel="noopener noreferrer">
${escape(s__('ClusterIntegration|Gitlab Integration'))}</a>`,
kubectl: `<code>kubectl</code>`,
},
false,
);
},
prometheusDescription() {
return sprintf(
escape(
s__(
`ClusterIntegration|Prometheus is an open-source monitoring system
with %{gitlabIntegrationLink} to monitor deployed applications.`,
),
),
{
gitlabIntegrationLink: `<a href="https://docs.gitlab.com/ce/user/project/integrations/prometheus.html"
target="_blank" rel="noopener noreferrer">
${escape(s__('ClusterIntegration|GitLab Integration'))}</a>`,
},
false,
);
},
jupyterInstalled() { jupyterInstalled() {
return this.applications.jupyter.status === APPLICATION_STATUS.INSTALLED; return this.applications.jupyter.status === APPLICATION_STATUS.INSTALLED;
}, },
...@@ -389,7 +325,21 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -389,7 +325,21 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
</template> </template>
<template v-else> <template v-else>
<div class="bs-callout bs-callout-info"> <div class="bs-callout bs-callout-info">
<strong v-html="ingressDescription"></strong> <strong>
<gl-sprintf
:message="
s__(
'ClusterIntegration|Installing Ingress may incur additional costs. Learn more about %{pricingLink}.',
)
"
>
<template #pricingLink>
<gl-link href="https://cloud.google.com/compute/pricing#lb" target="_blank">{{
s__('ClusterIntegration|pricing')
}}</gl-link>
</template>
</gl-sprintf>
</strong>
</div> </div>
</template> </template>
</div> </div>
...@@ -414,7 +364,21 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -414,7 +364,21 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
> >
<template #description> <template #description>
<div> <div>
<p v-html="certManagerDescription"></p> <p>
<gl-sprintf
:message="
s__(`ClusterIntegration|Cert-Manager is a native Kubernetes certificate management controller that helps with issuing certificates.
Installing Cert-Manager on your cluster will issue a certificate by %{letsEncrypt} and ensure that certificates
are valid and up-to-date.`)
"
>
<template #letsEncrypt>
<gl-link href="https://letsencrypt.org/" target="_blank">{{
s__(`ClusterIntegration|Let's Encrypt`)
}}</gl-link>
</template>
</gl-sprintf>
</p>
<div class="form-group"> <div class="form-group">
<label for="cert-manager-issuer-email"> <label for="cert-manager-issuer-email">
{{ s__('ClusterIntegration|Issuer Email') }} {{ s__('ClusterIntegration|Issuer Email') }}
...@@ -462,7 +426,20 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -462,7 +426,20 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
title-link="https://prometheus.io/docs/introduction/overview/" title-link="https://prometheus.io/docs/introduction/overview/"
> >
<template #description> <template #description>
<div v-html="prometheusDescription"></div> <gl-sprintf
:message="
s__(`ClusterIntegration|Prometheus is an open-source monitoring system
with %{gitlabIntegrationLink} to monitor deployed applications.`)
"
>
<template #gitlabIntegrationLink>
<gl-link
href="https://docs.gitlab.com/ce/user/project/integrations/prometheus.html"
target="_blank"
>{{ s__('ClusterIntegration|Gitlab Integration') }}</gl-link
>
</template>
</gl-sprintf>
</template> </template>
</application-row> </application-row>
<application-row <application-row
...@@ -516,7 +493,27 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -516,7 +493,27 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
> >
<template #description> <template #description>
<div> <div>
<p v-html="crossplaneDescription"></p> <p>
<gl-sprintf
:message="
s__(
`ClusterIntegration|Crossplane enables declarative provisioning of managed services from your cloud of choice using %{codeStart}kubectl%{codeEnd} or %{gitlabIntegrationLink}.
Crossplane runs inside your Kubernetes cluster and supports secure connectivity and secrets management between app containers and the cloud services they depend on.`,
)
"
>
<template #code="{content}">
<code>{{ content }}</code>
</template>
<template #gitlabIntegrationLink>
<gl-link
href="https://docs.gitlab.com/ee/user/clusters/applications.html#crossplane"
target="_blank"
>{{ s__('ClusterIntegration|Gitlab Integration') }}</gl-link
>
</template>
</gl-sprintf>
</p>
<div class="form-group"> <div class="form-group">
<CrossplaneProviderStack :crossplane="crossplane" @set="setCrossplaneProviderStack" /> <CrossplaneProviderStack :crossplane="crossplane" @set="setCrossplaneProviderStack" />
</div> </div>
...@@ -615,7 +612,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -615,7 +612,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
> >
<template #description> <template #description>
<div> <div>
<p v-if="!rbac" class="rbac-notice bs-callout bs-callout-info gl-mb-0"> <p v-if="!rbac" class="rbac-notice bs-callout bs-callout-info">
{{ {{
s__(`ClusterIntegration|You must have an RBAC-enabled cluster s__(`ClusterIntegration|You must have an RBAC-enabled cluster
to install Knative.`) to install Knative.`)
...@@ -624,7 +621,6 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -624,7 +621,6 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
{{ __('More information') }} {{ __('More information') }}
</a> </a>
</p> </p>
<br />
<p> <p>
{{ {{
s__(`ClusterIntegration|Knative extends Kubernetes to provide s__(`ClusterIntegration|Knative extends Kubernetes to provide
......
...@@ -4761,7 +4761,7 @@ msgstr "" ...@@ -4761,7 +4761,7 @@ msgstr ""
msgid "ClusterIntegration|Crossplane" msgid "ClusterIntegration|Crossplane"
msgstr "" msgstr ""
msgid "ClusterIntegration|Crossplane enables declarative provisioning of managed services from your cloud of choice using %{kubectl} or %{gitlabIntegrationLink}. Crossplane runs inside your Kubernetes cluster and supports secure connectivity and secrets management between app containers and the cloud services they depend on." msgid "ClusterIntegration|Crossplane enables declarative provisioning of managed services from your cloud of choice using %{codeStart}kubectl%{codeEnd} or %{gitlabIntegrationLink}. Crossplane runs inside your Kubernetes cluster and supports secure connectivity and secrets management between app containers and the cloud services they depend on."
msgstr "" msgstr ""
msgid "ClusterIntegration|Deletes all GitLab resources attached to this cluster during removal" msgid "ClusterIntegration|Deletes all GitLab resources attached to this cluster during removal"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment