diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /app/assets/javascripts/serverless/components | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/serverless/components')
-rw-r--r-- | app/assets/javascripts/serverless/components/empty_state.vue | 25 | ||||
-rw-r--r-- | app/assets/javascripts/serverless/components/functions.vue | 24 |
2 files changed, 36 insertions, 13 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> diff --git a/app/assets/javascripts/serverless/components/functions.vue b/app/assets/javascripts/serverless/components/functions.vue index b2d7aa75051..e9461aa3ead 100644 --- a/app/assets/javascripts/serverless/components/functions.vue +++ b/app/assets/javascripts/serverless/components/functions.vue @@ -1,8 +1,14 @@ <script> -import { GlLink, GlLoadingIcon, GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui'; +import { + GlLink, + GlAlert, + GlSprintf, + GlLoadingIcon, + GlSafeHtmlDirective as SafeHtml, +} from '@gitlab/ui'; import { mapState, mapActions, mapGetters } from 'vuex'; import { sprintf, s__ } from '~/locale'; -import { CHECKING_INSTALLED } from '../constants'; +import { CHECKING_INSTALLED, DEPRECATION_POST_LINK } from '../constants'; import EmptyState from './empty_state.vue'; import EnvironmentRow from './environment_row.vue'; @@ -11,11 +17,14 @@ export default { EnvironmentRow, EmptyState, GlLink, + GlAlert, + GlSprintf, GlLoadingIcon, }, directives: { SafeHtml, }, + deprecationPostLink: DEPRECATION_POST_LINK, computed: { ...mapState(['installed', 'isLoading', 'hasFunctionData', 'helpPath', 'statusPath']), ...mapGetters(['getFunctions']), @@ -65,6 +74,17 @@ export default { <template> <section id="serverless-functions" class="flex-grow"> + <gl-alert class="gl-mt-6" variant="warning" :dismissible="false"> + <gl-sprintf + :message="s__('Serverless|Serverless was %{linkStart}deprecated%{linkEnd} in GitLab 14.3.')" + ><template #link="{ content }" + ><gl-link :href="$options.deprecationPostLink" target="_blank">{{ + content + }}</gl-link></template + ></gl-sprintf + > + </gl-alert> + <gl-loading-icon v-if="checkingInstalled" size="lg" class="gl-mt-3 gl-mb-3" /> <div v-else-if="isInstalled"> |