Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e1a75994
Commit
e1a75994
authored
Apr 22, 2021
by
Savas Vedova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused prop injections and prefer injection over props
- Update tests
parent
d94af83f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
27 deletions
+7
-27
ee/app/assets/javascripts/security_dashboard/components/vulnerability_report.vue
...ts/security_dashboard/components/vulnerability_report.vue
+1
-7
ee/app/assets/javascripts/security_dashboard/vulnerability_report_init.js
...vascripts/security_dashboard/vulnerability_report_init.js
+3
-10
ee/spec/frontend/security_dashboard/components/vulnerability_report_spec.js
...ecurity_dashboard/components/vulnerability_report_spec.js
+3
-8
ee/spec/frontend_integration/security_dashboard/vulnerability_report_init_integration_spec.js
...y_dashboard/vulnerability_report_init_integration_spec.js
+0
-2
No files found.
ee/app/assets/javascripts/security_dashboard/components/vulnerability_report.vue
View file @
e1a75994
...
...
@@ -45,14 +45,8 @@ export default {
'
dashboardDocumentation
'
,
'
autoFixDocumentation
'
,
'
projectFullPath
'
,
'
pipeline
'
,
],
props
:
{
pipeline
:
{
type
:
Object
,
required
:
false
,
default
:
()
=>
({}),
},
},
queries
:
{
[
DASHBOARD_TYPES
.
GROUP
]:
vulnerableProjectsGroupQuery
,
[
DASHBOARD_TYPES
.
INSTANCE
]:
vulnerableProjectsInstanceQuery
,
...
...
ee/app/assets/javascripts/security_dashboard/vulnerability_report_init.js
View file @
e1a75994
...
...
@@ -22,8 +22,6 @@ export default (el, dashboardType) => {
hasVulnerabilities
,
scanners
,
securityDashboardHelpPath
,
projectAddEndpoint
,
projectListEndpoint
,
vulnerabilitiesExportEndpoint
,
projectFullPath
,
autoFixDocumentation
,
...
...
@@ -55,6 +53,7 @@ export default (el, dashboardType) => {
}
const
provide
=
{
pipeline
:
undefined
,
dashboardType
,
dashboardDocumentation
,
noVulnerabilitiesSvgPath
,
...
...
@@ -77,14 +76,8 @@ export default (el, dashboardType) => {
),
};
const
props
=
{
projectAddEndpoint
,
projectListEndpoint
,
dashboardType
,
};
if
(
dashboardType
===
DASHBOARD_TYPES
.
PROJECT
)
{
pro
ps
.
pipeline
=
{
pro
vide
.
pipeline
=
{
createdAt
:
pipelineCreatedAt
,
id
:
pipelineId
,
path
:
pipelinePath
,
...
...
@@ -103,7 +96,7 @@ export default (el, dashboardType) => {
apolloProvider
,
provide
,
render
(
createElement
)
{
return
createElement
(
VulnerabilityReport
,
{
props
}
);
return
createElement
(
VulnerabilityReport
);
},
});
};
ee/spec/frontend/security_dashboard/components/vulnerability_report_spec.js
View file @
e1a75994
...
...
@@ -56,6 +56,7 @@ describe('Vulnerability Report', () => {
mocks
,
propsData
,
provide
:
{
pipeline
:
undefined
,
groupFullPath
:
undefined
,
projectFullPath
:
undefined
,
autoFixDocumentation
:
undefined
,
...
...
@@ -230,14 +231,8 @@ describe('Vulnerability Report', () => {
provide
:
{
dashboardType
:
DASHBOARD_TYPES
.
PROJECT
,
autoFixDocumentation
:
'
path/to/help-page
'
,
glFeatures
:
{
securityAutoFix
,
},
},
propsData
:
{
pipeline
:
{
id
:
'
591
'
,
},
pipeline
:
{
id
:
'
591
'
},
glFeatures
:
{
securityAutoFix
},
},
apolloProvider
:
createApolloProvider
(),
});
...
...
ee/spec/frontend_integration/security_dashboard/vulnerability_report_init_integration_spec.js
View file @
e1a75994
...
...
@@ -12,8 +12,6 @@ const TEST_DATASET = {
noPipelineRunScannersHelpPath
:
'
/test/no_pipeline_run_page
'
,
notEnabledScannersHelpPath
:
'
/test/security_dashboard_not_enabled_page
'
,
noVulnerabilitiesSvgPath
:
'
/test/no_vulnerability_state.svg
'
,
projectAddEndpoint
:
'
/test/add-projects
'
,
projectListEndpoint
:
'
/test/list-projects
'
,
securityDashboardHelpPath
:
'
/test/security_dashboard_page
'
,
svgPath
:
'
/test/no_changes_state.svg
'
,
vulnerabilitiesExportEndpoint
:
'
/test/export-vulnerabilities
'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment