Commit 6c203b47 authored by Paul Slaughter's avatar Paul Slaughter

Merge branch '287676-remove-feature-flag-around-alert-picker' into 'master'

Remove feature flag check around policy alert creation

See merge request gitlab-org/gitlab!62319
parents 7a53a8dd ec171228
......@@ -14,7 +14,6 @@ import {
import { mapState, mapActions } from 'vuex';
import { redirectTo } from '~/lib/utils/url_utility';
import { s__, __, sprintf } from '~/locale';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import EnvironmentPicker from '../environment_picker.vue';
import {
EditorModeRule,
......@@ -59,7 +58,6 @@ export default {
DimDisableContainer,
},
directives: { GlModal: GlModalDirective },
mixins: [glFeatureFlagsMixin()],
props: {
threatMonitoringPath: {
type: String,
......@@ -135,9 +133,6 @@ export default {
? s__('NetworkPolicies|Save changes')
: s__('NetworkPolicies|Create policy');
},
showAlertsPicker() {
return this.glFeatures.threatMonitoringAlerts;
},
deleteModalTitle() {
return sprintf(s__('NetworkPolicies|Delete policy: %{policy}'), { policy: this.policy.name });
},
......@@ -345,11 +340,7 @@ export default {
</template>
<policy-action-picker />
<policy-alert-picker
v-if="showAlertsPicker"
:policy-alert="policyAlert"
@update-alert="handleAlertUpdate"
/>
<policy-alert-picker :policy-alert="policyAlert" @update-alert="handleAlertUpdate" />
</dim-disable-container>
</div>
<div class="col-sm-12 col-md-6 col-lg-5 col-xl-4">
......
......@@ -185,7 +185,7 @@ exports[`PolicyEditorApp component renders the policy editor layout 1`] = `
<policy-action-picker-stub />
<!---->
<policy-alert-picker-stub />
</dim-disable-container-stub>
</div>
......
......@@ -62,7 +62,6 @@ spec:
...propsData,
},
provide: {
glFeatures: { threatMonitoringAlerts: false },
...provide,
},
store,
......@@ -121,6 +120,10 @@ spec:
});
});
it('renders the policy alert picker', () => {
expect(findPolicyAlertPicker().exists()).toBe(true);
});
it('does not render yaml editor', () => {
expect(findYamlEditor().exists()).toBe(false);
});
......@@ -133,10 +136,6 @@ spec:
expect(findDeletePolicy().exists()).toBe(false);
});
it('does not render the policy alert picker', () => {
expect(findPolicyAlertPicker().exists()).toBe(false);
});
describe('given .yaml editor mode is enabled', () => {
beforeEach(() => {
factory({
......@@ -431,14 +430,6 @@ spec:
});
describe('add alert picker', () => {
beforeEach(() => {
factory({ provide: { glFeatures: { threatMonitoringAlerts: true } } });
});
it('does render the policy alert picker', () => {
expect(findPolicyAlertPicker().exists()).toBe(true);
});
it('adds a policy annotation on alert addition', async () => {
await modifyPolicyAlert({ isAlertEnabled: true });
expect(store.dispatch).toHaveBeenLastCalledWith('networkPolicies/createPolicy', {
......
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