diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-09 09:11:16 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-09 09:11:16 +0000 |
commit | 54573816ab79fac6716d1a1eae8c0da602765774 (patch) | |
tree | 2ebdf1558969cc88eacba7ce5618a299c88dcf3d /app/assets/javascripts/performance_bar/components | |
parent | 8602c599660974a47ad705fd5cc3f97cd37b1a0f (diff) | |
download | gitlab-ce-54573816ab79fac6716d1a1eae8c0da602765774.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/performance_bar/components')
3 files changed, 18 insertions, 8 deletions
diff --git a/app/assets/javascripts/performance_bar/components/performance_bar_app.vue b/app/assets/javascripts/performance_bar/components/performance_bar_app.vue index de988e28db9..f204f0ebfaa 100644 --- a/app/assets/javascripts/performance_bar/components/performance_bar_app.vue +++ b/app/assets/javascripts/performance_bar/components/performance_bar_app.vue @@ -1,4 +1,5 @@ <script> +import { GlSafeHtmlDirective } from '@gitlab/ui'; import { glEmojiTag } from '~/emoji'; import { s__ } from '~/locale'; @@ -12,6 +13,9 @@ export default { DetailedMetric, RequestSelector, }, + directives: { + SafeHtml: GlSafeHtmlDirective, + }, props: { store: { type: Object, @@ -128,6 +132,7 @@ export default { this.currentRequest = newRequestId; }, }, + safeHtmlConfig: { ADD_TAGS: ['gl-emoji'] }, }; </script> <template> @@ -143,7 +148,7 @@ export default { class="current-host" :class="{ canary: currentRequest.details.host.canary }" > - <span v-html="birdEmoji /* eslint-disable-line vue/no-v-html */"></span> + <span v-safe-html:[$options.safeHtmlConfig]="birdEmoji"></span> {{ currentRequest.details.host.hostname }} </span> </div> diff --git a/app/assets/javascripts/performance_bar/components/request_selector.vue b/app/assets/javascripts/performance_bar/components/request_selector.vue index 677efec85dc..a46ac620f48 100644 --- a/app/assets/javascripts/performance_bar/components/request_selector.vue +++ b/app/assets/javascripts/performance_bar/components/request_selector.vue @@ -1,5 +1,5 @@ <script> -import { GlPopover } from '@gitlab/ui'; +import { GlPopover, GlSafeHtmlDirective } from '@gitlab/ui'; import { glEmojiTag } from '~/emoji'; import { n__ } from '~/locale'; @@ -7,6 +7,9 @@ export default { components: { GlPopover, }, + directives: { + SafeHtml: GlSafeHtmlDirective, + }, props: { currentRequest: { type: Object, @@ -42,6 +45,7 @@ export default { methods: { glEmojiTag, }, + safeHtmlConfig: { ADD_TAGS: ['gl-emoji'] }, }; </script> <template> @@ -60,7 +64,7 @@ export default { <span v-if="requestsWithWarnings.length" class="gl-cursor-default"> <span id="performance-bar-request-selector-warning" - v-html="glEmojiTag('warning') /* eslint-disable-line vue/no-v-html */" + v-safe-html:[$options.safeHtmlConfig]="glEmojiTag('warning')" ></span> <gl-popover placement="bottom" diff --git a/app/assets/javascripts/performance_bar/components/request_warning.vue b/app/assets/javascripts/performance_bar/components/request_warning.vue index 01d6e68e3b0..3ebd222029b 100644 --- a/app/assets/javascripts/performance_bar/components/request_warning.vue +++ b/app/assets/javascripts/performance_bar/components/request_warning.vue @@ -1,11 +1,14 @@ <script> -import { GlPopover } from '@gitlab/ui'; +import { GlPopover, GlSafeHtmlDirective } from '@gitlab/ui'; import { glEmojiTag } from '~/emoji'; export default { components: { GlPopover, }, + directives: { + SafeHtml: GlSafeHtmlDirective, + }, props: { htmlId: { type: String, @@ -31,14 +34,12 @@ export default { methods: { glEmojiTag, }, + safeHtmlConfig: { ADD_TAGS: ['gl-emoji'] }, }; </script> <template> <span v-if="hasWarnings" class="gl-cursor-default"> - <span - :id="htmlId" - v-html="glEmojiTag('warning') /* eslint-disable-line vue/no-v-html */" - ></span> + <span :id="htmlId" v-safe-html:[$options.safeHtmlConfig]="glEmojiTag('warning')"></span> <gl-popover placement="bottom" :target="htmlId" :content="warningMessage" /> </span> </template> |