Commit fdabd907 authored by Paul Slaughter's avatar Paul Slaughter

Merge branch '9102-remove-feature-flag' into 'master'

Remove hide_dismissed_vulnerabilities feature flag

See merge request gitlab-org/gitlab!20483
parents bbc34063 38608cb4
...@@ -11,7 +11,6 @@ class Projects::PipelinesController < Projects::ApplicationController ...@@ -11,7 +11,6 @@ class Projects::PipelinesController < Projects::ApplicationController
before_action :authorize_create_pipeline!, only: [:new, :create] before_action :authorize_create_pipeline!, only: [:new, :create]
before_action :authorize_update_pipeline!, only: [:retry, :cancel] before_action :authorize_update_pipeline!, only: [:retry, :cancel]
before_action do before_action do
push_frontend_feature_flag(:hide_dismissed_vulnerabilities)
push_frontend_feature_flag(:junit_pipeline_view) push_frontend_feature_flag(:junit_pipeline_view)
end end
......
...@@ -74,9 +74,6 @@ export default { ...@@ -74,9 +74,6 @@ export default {
shouldShowCountList() { shouldShowCountList() {
return this.isLockedToProject && Boolean(this.vulnerabilitiesCountEndpoint); return this.isLockedToProject && Boolean(this.vulnerabilitiesCountEndpoint);
}, },
showHideDismissedToggle() {
return Boolean(gon.features && gon.features.hideDismissedVulnerabilities);
},
}, },
watch: { watch: {
'pageInfo.total': 'emitVulnerabilitiesCountChanged', 'pageInfo.total': 'emitVulnerabilitiesCountChanged',
...@@ -89,9 +86,7 @@ export default { ...@@ -89,9 +86,7 @@ export default {
}); });
} }
this.setPipelineId(this.pipelineId); this.setPipelineId(this.pipelineId);
if (this.showHideDismissedToggle) { this.setHideDismissedToggleInitialState();
this.setHideDismissedToggleInitialState();
}
this.setVulnerabilitiesEndpoint(this.vulnerabilitiesEndpoint); this.setVulnerabilitiesEndpoint(this.vulnerabilitiesEndpoint);
this.setVulnerabilitiesCountEndpoint(this.vulnerabilitiesCountEndpoint); this.setVulnerabilitiesCountEndpoint(this.vulnerabilitiesCountEndpoint);
this.setVulnerabilitiesHistoryEndpoint(this.vulnerabilitiesHistoryEndpoint); this.setVulnerabilitiesHistoryEndpoint(this.vulnerabilitiesHistoryEndpoint);
...@@ -131,7 +126,7 @@ export default { ...@@ -131,7 +126,7 @@ export default {
<template> <template>
<section> <section>
<header> <header>
<filters :show-hide-dismissed-toggle="showHideDismissedToggle" /> <filters />
</header> </header>
<vulnerability-count-list v-if="shouldShowCountList" class="mb-0" /> <vulnerability-count-list v-if="shouldShowCountList" class="mb-0" />
......
...@@ -8,13 +8,6 @@ export default { ...@@ -8,13 +8,6 @@ export default {
DashboardFilter, DashboardFilter,
GlToggleVuex, GlToggleVuex,
}, },
props: {
showHideDismissedToggle: {
type: Boolean,
required: false,
default: false,
},
},
computed: { computed: {
...mapGetters({ ...mapGetters({
filters: 'filters/visibleFilters', filters: 'filters/visibleFilters',
...@@ -32,7 +25,7 @@ export default { ...@@ -32,7 +25,7 @@ export default {
class="col-sm-6 col-md-4 col-lg-2 p-2 js-filter" class="col-sm-6 col-md-4 col-lg-2 p-2 js-filter"
:filter-id="filter.id" :filter-id="filter.id"
/> />
<div v-if="showHideDismissedToggle" class="ml-lg-auto p-2"> <div class="ml-lg-auto p-2">
<strong>{{ s__('SecurityDashboard|Hide dismissed') }}</strong> <strong>{{ s__('SecurityDashboard|Hide dismissed') }}</strong>
<gl-toggle-vuex <gl-toggle-vuex
class="d-block mt-1 js-toggle" class="d-block mt-1 js-toggle"
......
...@@ -32,11 +32,9 @@ export const activeFilters = state => { ...@@ -32,11 +32,9 @@ export const activeFilters = state => {
acc[filter.id] = [...Array.from(filter.selection)].filter(id => !isBaseFilterOption(id)); acc[filter.id] = [...Array.from(filter.selection)].filter(id => !isBaseFilterOption(id));
return acc; return acc;
}, {}); }, {});
// hideDismissed is hardcoded as it currently is an edge-case, more info in the MR: // hide_dismissed is hardcoded as it currently is an edge-case, more info in the MR:
// https://gitlab.com/gitlab-org/gitlab/merge_requests/15333#note_208301144 // https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/15333#note_208301144
if (gon.features && gon.features.hideDismissedVulnerabilities) { filters.scope = state.hideDismissed ? 'dismissed' : 'all';
filters.scope = state.hideDismissed ? 'dismissed' : 'all';
}
return filters; return filters;
}; };
......
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
class Groups::Security::DashboardController < Groups::ApplicationController class Groups::Security::DashboardController < Groups::ApplicationController
layout 'group' layout 'group'
before_action only: [:show] do
push_frontend_feature_flag(:hide_dismissed_vulnerabilities)
end
def show def show
render :unavailable unless dashboard_available? render :unavailable unless dashboard_available?
end end
......
...@@ -7,10 +7,6 @@ module Projects ...@@ -7,10 +7,6 @@ module Projects
alias_method :vulnerable, :project alias_method :vulnerable, :project
before_action only: [:show] do
push_frontend_feature_flag(:hide_dismissed_vulnerabilities)
end
def show def show
@pipeline = @project.latest_pipeline_with_security_reports @pipeline = @project.latest_pipeline_with_security_reports
&.present(current_user: current_user) &.present(current_user: current_user)
......
...@@ -29,7 +29,7 @@ module Security ...@@ -29,7 +29,7 @@ module Security
collection = by_project(collection) collection = by_project(collection)
collection = by_severity(collection) collection = by_severity(collection)
collection = by_confidence(collection) collection = by_confidence(collection)
collection = by_scope(collection) unless Feature.disabled?(:hide_dismissed_vulnerabilities) collection = by_scope(collection)
collection collection
end end
......
...@@ -156,8 +156,6 @@ describe('Security Dashboard app', () => { ...@@ -156,8 +156,6 @@ describe('Security Dashboard app', () => {
describe('dismissed vulnerabilities', () => { describe('dismissed vulnerabilities', () => {
beforeEach(() => { beforeEach(() => {
gon.features = gon.features || {};
gon.features.hideDismissedVulnerabilities = true;
getParameterValues.mockImplementation(() => [true]); getParameterValues.mockImplementation(() => [true]);
setup(); setup();
}); });
......
...@@ -10,12 +10,7 @@ describe('Filter component', () => { ...@@ -10,12 +10,7 @@ describe('Filter component', () => {
describe('severity', () => { describe('severity', () => {
beforeEach(() => { beforeEach(() => {
vm = mountComponentWithStore(Component, { vm = mountComponentWithStore(Component, { store });
store,
props: {
showHideDismissedToggle: true,
},
});
}); });
afterEach(() => { afterEach(() => {
......
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