Commit 1e45c8e4 authored by Dave Pisek's avatar Dave Pisek

Pipeline Security Dashboard: move props to inject

This commit removes all props and provides the values via injecting
them.
parent 438bd0a3
......@@ -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,
},
render(createElement) {
return createElement(PipelineSecurityDashboard, {
props: {
projectId: parseInt(projectId, 10),
vulnerabilitiesEndpoint,
loadingErrorIllustrations,
},
});
render(createElement) {
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