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