Commit 9bf2b199 authored by Mike Greiling's avatar Mike Greiling

Merge branch '242024-migrate-bs-callout-ancestor-notice' into 'master'

Migrate the bs-callout class to gl-alert in ancestor notice

See merge request gitlab-org/gitlab!51209
parents 3597acf8 de4d9a9e
<script> <script>
import { GlLink, GlSprintf } from '@gitlab/ui'; import { GlLink, GlSprintf, GlAlert } from '@gitlab/ui';
import { mapState } from 'vuex'; import { mapState } from 'vuex';
export default { export default {
components: { components: {
GlLink, GlLink,
GlSprintf, GlSprintf,
GlAlert,
}, },
computed: { computed: {
...mapState(['ancestorHelperPath', 'hasAncestorClusters']), ...mapState(['ancestorHelperPath', 'hasAncestorClusters']),
...@@ -14,21 +15,19 @@ export default { ...@@ -14,21 +15,19 @@ export default {
</script> </script>
<template> <template>
<div v-if="hasAncestorClusters" class="bs-callout bs-callout-info"> <gl-alert v-if="hasAncestorClusters" variant="info" :dismissible="false" class="gl-my-4">
<p> <gl-sprintf
<gl-sprintf :message="
:message=" s__(
s__( 'ClusterIntegration|Clusters are utilized by selecting the nearest ancestor with a matching environment scope. For example, project clusters will override group clusters. %{linkStart}More information%{linkEnd}',
'ClusterIntegration|Clusters are utilized by selecting the nearest ancestor with a matching environment scope. For example, project clusters will override group clusters. %{linkStart}More information%{linkEnd}', )
) "
" >
> <template #link="{ content }">
<template #link="{ content }"> <gl-link :href="ancestorHelperPath">
<gl-link :href="ancestorHelperPath"> <strong>{{ content }}</strong>
<strong>{{ content }}</strong> </gl-link>
</gl-link> </template>
</template> </gl-sprintf>
</gl-sprintf> </gl-alert>
</p>
</div>
</template> </template>
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlLink, GlSprintf } from '@gitlab/ui'; import { GlLink, GlSprintf, GlAlert } from '@gitlab/ui';
import AncestorNotice from '~/clusters_list/components/ancestor_notice.vue'; import AncestorNotice from '~/clusters_list/components/ancestor_notice.vue';
import ClusterStore from '~/clusters_list/store'; import ClusterStore from '~/clusters_list/store';
...@@ -9,7 +9,7 @@ describe('ClustersAncestorNotice', () => { ...@@ -9,7 +9,7 @@ describe('ClustersAncestorNotice', () => {
const createWrapper = () => { const createWrapper = () => {
store = ClusterStore({ ancestorHelperPath: '/some/ancestor/path' }); store = ClusterStore({ ancestorHelperPath: '/some/ancestor/path' });
wrapper = shallowMount(AncestorNotice, { store, stubs: { GlSprintf } }); wrapper = shallowMount(AncestorNotice, { store, stubs: { GlSprintf, GlAlert } });
return wrapper.vm.$nextTick(); return wrapper.vm.$nextTick();
}; };
......
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