diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-13 18:09:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-13 18:09:34 +0300 |
commit | c4eeda2d3d048e84b331f416472e99ed0e116904 (patch) | |
tree | d2ac30119226e46f54f41961e3eed2cd5b5bdb5b /app/assets/javascripts/projects | |
parent | cdd5eba514e79c7801ff2eeb76e915e3f31ca5d7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/projects')
-rw-r--r-- | app/assets/javascripts/projects/clusters_deprecation_alert/components/clusters_deprecation_alert.vue | 23 | ||||
-rw-r--r-- | app/assets/javascripts/projects/clusters_deprecation_alert/index.js | 21 |
2 files changed, 44 insertions, 0 deletions
diff --git a/app/assets/javascripts/projects/clusters_deprecation_alert/components/clusters_deprecation_alert.vue b/app/assets/javascripts/projects/clusters_deprecation_alert/components/clusters_deprecation_alert.vue new file mode 100644 index 00000000000..e026b3e1060 --- /dev/null +++ b/app/assets/javascripts/projects/clusters_deprecation_alert/components/clusters_deprecation_alert.vue @@ -0,0 +1,23 @@ +<script> +import { GlAlert, GlSprintf, GlLink } from '@gitlab/ui'; +import { helpPagePath } from '~/helpers/help_page_helper'; + +export default { + components: { + GlAlert, + GlSprintf, + GlLink, + }, + inject: ['message'], + docsLink: helpPagePath('user/infrastructure/clusters/migrate_to_gitlab_agent.md'), +}; +</script> +<template> + <gl-alert :dismissible="false" variant="warning" class="gl-mt-5"> + <gl-sprintf :message="message"> + <template #link="{ content }"> + <gl-link :href="$options.docsLink">{{ content }}</gl-link> + </template> + </gl-sprintf> + </gl-alert> +</template> diff --git a/app/assets/javascripts/projects/clusters_deprecation_alert/index.js b/app/assets/javascripts/projects/clusters_deprecation_alert/index.js new file mode 100644 index 00000000000..e17c1900dc1 --- /dev/null +++ b/app/assets/javascripts/projects/clusters_deprecation_alert/index.js @@ -0,0 +1,21 @@ +import Vue from 'vue'; +import ClustersDeprecationAlert from './components/clusters_deprecation_alert.vue'; + +export default () => { + const el = document.querySelector('.js-clusters-deprecation-alert'); + + if (!el) { + return false; + } + + const { message } = el.dataset; + + return new Vue({ + el, + name: 'ClustersDeprecationAlertRoot', + provide: { + message, + }, + render: (createElement) => createElement(ClustersDeprecationAlert), + }); +}; |