Commit de08f61a authored by Mike Greiling's avatar Mike Greiling

Merge branch 'use-feature-flags-mixin-in-grouped-security-reports-app' into 'master'

Use feature flags mixin in grouped security reports app

See merge request gitlab-org/gitlab!21251
parents 230e1c02 467a3a92
<script> <script>
import { mapActions, mapState, mapGetters } from 'vuex'; import { mapActions, mapState, mapGetters } from 'vuex';
import { componentNames } from 'ee/reports/components/issue_body'; import { componentNames } from 'ee/reports/components/issue_body';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import ReportSection from '~/reports/components/report_section.vue'; import ReportSection from '~/reports/components/report_section.vue';
import SummaryRow from '~/reports/components/summary_row.vue'; import SummaryRow from '~/reports/components/summary_row.vue';
import IssuesList from '~/reports/components/issues_list.vue'; import IssuesList from '~/reports/components/issues_list.vue';
...@@ -18,7 +19,7 @@ export default { ...@@ -18,7 +19,7 @@ export default {
IssueModal, IssueModal,
Icon, Icon,
}, },
mixins: [securityReportsMixin], mixins: [securityReportsMixin, glFeatureFlagsMixin()],
props: { props: {
enabledReports: { enabledReports: {
type: Object, type: Object,
...@@ -324,7 +325,7 @@ export default { ...@@ -324,7 +325,7 @@ export default {
fetchSastDiff: 'fetchDiff', fetchSastDiff: 'fetchDiff',
}), }),
isMergeRequestReportApiEnabled(type) { isMergeRequestReportApiEnabled(type) {
return Boolean(gon.features && gon.features[`${type}MergeRequestReportApi`]); return Boolean(this.glFeatures[`${type}MergeRequestReportApi`]);
}, },
hasReportsType(type) { hasReportsType(type) {
if (this.isMergeRequestReportApiEnabled(type)) { if (this.isMergeRequestReportApiEnabled(type)) {
......
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