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