Commit 7daa8a09 authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch...

Merge branch '333063-follow-up-from-enforce-json-schema-validation-for-generic-security-report-fe' into 'master'

Pipeline Security Dashboard: move props to inject

See merge request gitlab-org/gitlab!63719
parents 804c3bcb 1e45c8e4
......@@ -20,21 +20,15 @@ export default {
VulnerabilityReport,
},
mixins: [glFeatureFlagMixin()],
inject: ['projectFullPath', 'pipeline', 'dashboardDocumentation', 'emptyStateSvgPath'],
props: {
projectId: {
type: Number,
required: true,
},
vulnerabilitiesEndpoint: {
type: String,
required: true,
},
loadingErrorIllustrations: {
type: Object,
required: true,
},
},
inject: [
'dashboardDocumentation',
'emptyStateSvgPath',
'loadingErrorIllustrations',
'pipeline',
'projectFullPath',
'projectId',
'vulnerabilitiesEndpoint',
],
data() {
return {
securityReportSummary: {},
......
......@@ -42,6 +42,7 @@ export default () => {
}),
provide: {
dashboardType: DASHBOARD_TYPES.PIPELINE,
projectId: parseInt(projectId, 10),
projectFullPath,
dashboardDocumentation,
emptyStateSvgPath,
......@@ -53,15 +54,11 @@ export default () => {
sourceBranch,
},
securityReportHelpPageLink,
vulnerabilitiesEndpoint,
loadingErrorIllustrations,
},
render(createElement) {
return createElement(PipelineSecurityDashboard, {
props: {
projectId: parseInt(projectId, 10),
vulnerabilitiesEndpoint,
loadingErrorIllustrations,
},
});
return createElement(PipelineSecurityDashboard);
},
});
};
......@@ -55,6 +55,7 @@ describe('Pipeline Security Dashboard component', () => {
localVue,
store,
provide: {
projectId,
projectFullPath: 'my-path',
emptyStateSvgPath,
dashboardDocumentation,
......@@ -64,12 +65,9 @@ describe('Pipeline Security Dashboard component', () => {
jobsPath,
sourceBranch,
},
...provide,
},
propsData: {
projectId,
vulnerabilitiesEndpoint,
loadingErrorIllustrations,
...provide,
},
stubs,
data() {
......
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