Commit fce41f3a authored by Dheeraj Joshi's avatar Dheeraj Joshi

Remove v-html from monitoring empty state

parent 2847f795
<script> <script>
import chartEmptyStateIllustration from '@gitlab/svgs/dist/illustrations/chart-empty-state.svg'; import chartEmptyStateIllustration from '@gitlab/svgs/dist/illustrations/chart-empty-state.svg';
import { GlSafeHtmlDirective } from '@gitlab/ui';
import { chartHeight } from '../../constants'; import { chartHeight } from '../../constants';
export default { export default {
directives: {
SafeHtml: GlSafeHtmlDirective,
},
data() { data() {
return { return {
height: chartHeight, height: chartHeight,
...@@ -18,14 +22,15 @@ export default { ...@@ -18,14 +22,15 @@ export default {
created() { created() {
this.chartEmptyStateIllustration = chartEmptyStateIllustration; this.chartEmptyStateIllustration = chartEmptyStateIllustration;
}, },
safeHtmlConfig: { ADD_TAGS: ['use'] },
}; };
</script> </script>
<template> <template>
<div class="d-flex flex-column justify-content-center"> <div class="d-flex flex-column justify-content-center">
<div <div
v-safe-html:[$options.safeHtmlConfig]="chartEmptyStateIllustration"
class="gl-mt-3 svg-w-100 d-flex align-items-center" class="gl-mt-3 svg-w-100 d-flex align-items-center"
:style="svgContainerStyle" :style="svgContainerStyle"
v-html="chartEmptyStateIllustration /* eslint-disable-line vue/no-v-html */"
></div> ></div>
<h5 class="text-center gl-mt-3">{{ __('No data to display') }}</h5> <h5 class="text-center gl-mt-3">{{ __('No data to display') }}</h5>
</div> </div>
......
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