Commit 789d1d17 authored by Dhiraj Bodicherla's avatar Dhiraj Bodicherla Committed by Phil Hughes

Alert widget in monitoring dashboard uses gon instead of vue mixin

parent 5609ce5a
...@@ -15,6 +15,7 @@ import { ...@@ -15,6 +15,7 @@ import {
import { __, s__ } from '~/locale'; import { __, s__ } from '~/locale';
import Translate from '~/vue_shared/translate'; import Translate from '~/vue_shared/translate';
import TrackEventDirective from '~/vue_shared/directives/track_event'; import TrackEventDirective from '~/vue_shared/directives/track_event';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
import { alertsValidator, queriesValidator } from '../validators'; import { alertsValidator, queriesValidator } from '../validators';
...@@ -54,6 +55,7 @@ export default { ...@@ -54,6 +55,7 @@ export default {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
TrackEvent: TrackEventDirective, TrackEvent: TrackEventDirective,
}, },
mixins: [glFeatureFlagsMixin()],
props: { props: {
disabled: { disabled: {
type: Boolean, type: Boolean,
...@@ -104,7 +106,7 @@ export default { ...@@ -104,7 +106,7 @@ export default {
return this.disabled || !(this.prometheusMetricId || this.isValidQuery); return this.disabled || !(this.prometheusMetricId || this.isValidQuery);
}, },
supportsComputedAlerts() { supportsComputedAlerts() {
return gon.features && gon.features.prometheusComputedAlerts; return this.glFeatures.prometheusComputedAlerts;
}, },
queryDropdownLabel() { queryDropdownLabel() {
return this.currentQuery.label || s__('PrometheusAlerts|Select query'); return this.currentQuery.label || s__('PrometheusAlerts|Select query');
......
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