diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 20:02:30 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 20:02:30 +0000 |
commit | 41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch) | |
tree | 9c8d89a8624828992f06d892cd2f43818ff5dcc8 /app/assets/javascripts/monitoring/components/charts/gauge.vue | |
parent | 0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff) | |
download | gitlab-ce-14.9.0-rc42.tar.gz |
Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42
Diffstat (limited to 'app/assets/javascripts/monitoring/components/charts/gauge.vue')
-rw-r--r-- | app/assets/javascripts/monitoring/components/charts/gauge.vue | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/app/assets/javascripts/monitoring/components/charts/gauge.vue b/app/assets/javascripts/monitoring/components/charts/gauge.vue index 461ff06be72..0477ff19ffe 100644 --- a/app/assets/javascripts/monitoring/components/charts/gauge.vue +++ b/app/assets/javascripts/monitoring/components/charts/gauge.vue @@ -1,5 +1,4 @@ <script> -import { GlResizeObserverDirective } from '@gitlab/ui'; import { GlGaugeChart } from '@gitlab/ui/dist/charts'; import { isFinite, isArray, isInteger } from 'lodash'; import { getFormatter, SUPPORTED_FORMATS } from '~/lib/utils/unit_format'; @@ -10,9 +9,6 @@ export default { components: { GlGaugeChart, }, - directives: { - GlResizeObserverDirective, - }, props: { graphData: { type: Object, @@ -96,27 +92,19 @@ export default { return this.queryResult || NaN; }, }, - methods: { - onResize() { - if (!this.$refs.gaugeChart) return; - const { width } = this.$refs.gaugeChart.$el.getBoundingClientRect(); - this.width = width; - }, - }, }; </script> <template> - <div v-gl-resize-observer-directive="onResize"> - <gl-gauge-chart - ref="gaugeChart" - v-bind="$attrs" - :value="value" - :min="rangeValues.min" - :max="rangeValues.max" - :thresholds="thresholdsValue" - :text="textValue" - :split-number="splitValue" - :width="width" - /> - </div> + <gl-gauge-chart + ref="gaugeChart" + v-bind="$attrs" + :responsive="true" + :value="value" + :min="rangeValues.min" + :max="rangeValues.max" + :thresholds="thresholdsValue" + :text="textValue" + :split-number="splitValue" + :width="width" + /> </template> |