Commit c188d1dc authored by Daniel Tian's avatar Daniel Tian

Enable vulnerability_report_pagination feature flag by default

Enable vulnerability_report_pagination feature flag by default, and also
remove vulnerability_report_page_size_selector feature flag in favor of
the vulnerability_report_pagination feature flag.

Changelog: changed
MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/84553
EE: true
parent b453775c
---
name: vulnerability_report_page_size_selector
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/82438
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/356888
milestone: '14.10'
type: development
group: group::threat insights
default_enabled: false
...@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/351975 ...@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/351975
milestone: '14.8' milestone: '14.8'
type: development type: development
group: group::threat insights group: group::threat insights
default_enabled: false default_enabled: true
...@@ -175,9 +175,6 @@ export default { ...@@ -175,9 +175,6 @@ export default {
shouldUsePagination() { shouldUsePagination() {
return Boolean(this.glFeatures.vulnerabilityReportPagination); return Boolean(this.glFeatures.vulnerabilityReportPagination);
}, },
shouldShowPageSizeSelector() {
return Boolean(this.glFeatures.vulnerabilityReportPageSizeSelector);
},
}, },
watch: { watch: {
filters(newFilters, oldFilters) { filters(newFilters, oldFilters) {
...@@ -259,11 +256,7 @@ export default { ...@@ -259,11 +256,7 @@ export default {
@prev="getPrevPage" @prev="getPrevPage"
/> />
<local-storage-sync <local-storage-sync v-model="pageSize" :storage-key="$options.PAGE_SIZE_STORAGE_KEY">
v-if="shouldShowPageSizeSelector"
v-model="pageSize"
:storage-key="$options.PAGE_SIZE_STORAGE_KEY"
>
<page-size-selector v-model="pageSize" class="gl-absolute gl-right-0" /> <page-size-selector v-model="pageSize" class="gl-absolute gl-right-0" />
</local-storage-sync> </local-storage-sync>
</div> </div>
......
...@@ -13,7 +13,6 @@ module EE ...@@ -13,7 +13,6 @@ module EE
push_frontend_feature_flag(:graphql_code_quality_full_report, project, type: :development, default_enabled: :yaml) push_frontend_feature_flag(:graphql_code_quality_full_report, project, type: :development, default_enabled: :yaml)
push_frontend_feature_flag(:secure_vulnerability_training, project, default_enabled: :yaml) push_frontend_feature_flag(:secure_vulnerability_training, project, default_enabled: :yaml)
push_frontend_feature_flag(:vulnerability_report_pagination, current_user, default_enabled: :yaml) push_frontend_feature_flag(:vulnerability_report_pagination, current_user, default_enabled: :yaml)
push_frontend_feature_flag(:vulnerability_report_page_size_selector, default_enabled: :yaml)
push_frontend_feature_flag(:use_api_for_payment_validation, project, default_enabled: :yaml) push_frontend_feature_flag(:use_api_for_payment_validation, project, default_enabled: :yaml)
end end
......
...@@ -8,7 +8,6 @@ module Groups ...@@ -8,7 +8,6 @@ module Groups
before_action do before_action do
push_frontend_feature_flag(:vulnerability_management_survey, type: :ops, default_enabled: :yaml) push_frontend_feature_flag(:vulnerability_management_survey, type: :ops, default_enabled: :yaml)
push_frontend_feature_flag(:vulnerability_report_pagination, current_user, default_enabled: :yaml) push_frontend_feature_flag(:vulnerability_report_pagination, current_user, default_enabled: :yaml)
push_frontend_feature_flag(:vulnerability_report_page_size_selector, default_enabled: :yaml)
end end
feature_category :vulnerability_management feature_category :vulnerability_management
......
...@@ -10,7 +10,6 @@ module Projects ...@@ -10,7 +10,6 @@ module Projects
push_frontend_feature_flag(:vulnerability_management_survey, type: :ops, default_enabled: :yaml) push_frontend_feature_flag(:vulnerability_management_survey, type: :ops, default_enabled: :yaml)
push_frontend_feature_flag(:secure_vulnerability_training, @project, default_enabled: :yaml) push_frontend_feature_flag(:secure_vulnerability_training, @project, default_enabled: :yaml)
push_frontend_feature_flag(:vulnerability_report_pagination, current_user, default_enabled: :yaml) push_frontend_feature_flag(:vulnerability_report_pagination, current_user, default_enabled: :yaml)
push_frontend_feature_flag(:vulnerability_report_page_size_selector, default_enabled: :yaml)
push_frontend_feature_flag(:new_vulnerability_form, @project, default_enabled: :yaml) push_frontend_feature_flag(:new_vulnerability_form, @project, default_enabled: :yaml)
end end
......
...@@ -7,7 +7,6 @@ module Security ...@@ -7,7 +7,6 @@ module Security
before_action do before_action do
push_frontend_feature_flag(:vulnerability_management_survey, type: :ops, default_enabled: :yaml) push_frontend_feature_flag(:vulnerability_management_survey, type: :ops, default_enabled: :yaml)
push_frontend_feature_flag(:vulnerability_report_pagination, current_user, default_enabled: :yaml) push_frontend_feature_flag(:vulnerability_report_pagination, current_user, default_enabled: :yaml)
push_frontend_feature_flag(:vulnerability_report_page_size_selector, default_enabled: :yaml)
end end
end end
end end
...@@ -61,7 +61,6 @@ describe('Vulnerability list GraphQL component', () => { ...@@ -61,7 +61,6 @@ describe('Vulnerability list GraphQL component', () => {
showProjectNamespace = false, showProjectNamespace = false,
hasJiraVulnerabilitiesIntegrationEnabled = false, hasJiraVulnerabilitiesIntegrationEnabled = false,
vulnerabilityReportPagination = false, vulnerabilityReportPagination = false,
vulnerabilityReportPageSizeSelector = false,
filters = {}, filters = {},
fields = [], fields = [],
} = {}) => { } = {}) => {
...@@ -73,7 +72,7 @@ describe('Vulnerability list GraphQL component', () => { ...@@ -73,7 +72,7 @@ describe('Vulnerability list GraphQL component', () => {
dashboardType: DASHBOARD_TYPES.GROUP, dashboardType: DASHBOARD_TYPES.GROUP,
canViewFalsePositive, canViewFalsePositive,
hasJiraVulnerabilitiesIntegrationEnabled, hasJiraVulnerabilitiesIntegrationEnabled,
glFeatures: { vulnerabilityReportPagination, vulnerabilityReportPageSizeSelector }, glFeatures: { vulnerabilityReportPagination },
}, },
propsData: { propsData: {
query: vulnerabilitiesQuery, query: vulnerabilitiesQuery,
...@@ -341,19 +340,9 @@ describe('Vulnerability list GraphQL component', () => { ...@@ -341,19 +340,9 @@ describe('Vulnerability list GraphQL component', () => {
expect(findPageSizeSelector().exists()).toBe(false); expect(findPageSizeSelector().exists()).toBe(false);
}); });
it('is not shown if the pagination feature flag is on but the page size selector feature flag is off', () => { describe('pagination feature flag enabled', () => {
createWrapper({ vulnerabilityReportPagination: true });
expect(findLocalStorageSync().exists()).toBe(false);
expect(findPageSizeSelector().exists()).toBe(false);
});
describe('both feature flags enabled', () => {
beforeEach(() => { beforeEach(() => {
createWrapper({ createWrapper({ vulnerabilityReportPagination: true });
vulnerabilityReportPagination: true,
vulnerabilityReportPageSizeSelector: true,
});
}); });
it('uses the default page size if page size selector was not changed', () => { it('uses the default page size if page size selector was not changed', () => {
......
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