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
ad3c27c0
Commit
ad3c27c0
authored
Apr 13, 2020
by
Tetiana Chupryna
Committed by
Phil Hughes
Apr 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use `license_scanning` in `enabled_reports` keys
parent
23795036
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
11 deletions
+9
-11
ee/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
...avascripts/vue_merge_request_widget/mr_widget_options.vue
+1
-1
ee/app/models/ee/merge_request.rb
ee/app/models/ee/merge_request.rb
+0
-1
ee/spec/javascripts/vue_mr_widget/ee_mr_widget_options_spec.js
...ec/javascripts/vue_mr_widget/ee_mr_widget_options_spec.js
+7
-7
ee/spec/models/merge_request_spec.rb
ee/spec/models/merge_request_spec.rb
+1
-2
No files found.
ee/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
View file @
ad3c27c0
...
...
@@ -47,7 +47,7 @@ export default {
return
codeclimate
&&
codeclimate
.
head_path
;
},
shouldRenderLicenseReport
()
{
return
this
.
mr
.
enabledReports
?.
license
Management
;
return
this
.
mr
.
enabledReports
?.
license
Scanning
;
},
hasCodequalityIssues
()
{
return
(
...
...
ee/app/models/ee/merge_request.rb
View file @
ad3c27c0
...
...
@@ -168,7 +168,6 @@ module EE
container_scanning:
report_type_enabled?
(
:container_scanning
),
dast:
report_type_enabled?
(
:dast
),
dependency_scanning:
report_type_enabled?
(
:dependency_scanning
),
license_management:
report_type_enabled?
(
:license_scanning
),
license_scanning:
report_type_enabled?
(
:license_scanning
)
}
end
...
...
ee/spec/javascripts/vue_mr_widget/ee_mr_widget_options_spec.js
View file @
ad3c27c0
...
...
@@ -780,14 +780,14 @@ describe('ee merge request widget options', () => {
});
});
describe
(
'
license
management
report
'
,
()
=>
{
describe
(
'
license
scanning
report
'
,
()
=>
{
const
licenseManagementApiUrl
=
`
${
TEST_HOST
}
/manage_license_api`
;
it
(
'
should be rendered if license
management
data is set
'
,
()
=>
{
it
(
'
should be rendered if license
scanning
data is set
'
,
()
=>
{
gl
.
mrWidgetData
=
{
...
mockData
,
enabled_reports
:
{
license_
management
:
true
,
license_
scanning
:
true
,
},
license_scanning
:
{
managed_licenses_path
:
licenseManagementApiUrl
,
...
...
@@ -800,10 +800,10 @@ describe('ee merge request widget options', () => {
expect
(
vm
.
$el
.
querySelector
(
'
.license-report-widget
'
)).
not
.
toBeNull
();
});
it
(
'
should not be rendered if license
management
data is not set
'
,
()
=>
{
it
(
'
should not be rendered if license
scanning
data is not set
'
,
()
=>
{
gl
.
mrWidgetData
=
{
...
mockData
,
license_
management
:
{},
license_
scanning
:
{},
};
vm
=
mountComponent
(
Component
,
{
mrData
:
gl
.
mrWidgetData
});
...
...
@@ -1096,7 +1096,7 @@ describe('ee merge request widget options', () => {
undefined
,
{},
{
foo
:
true
},
{
license_
management
:
true
},
{
license_
scanning
:
true
},
{
dast
:
false
,
sast
:
false
,
...
...
@@ -1112,7 +1112,7 @@ describe('ee merge request widget options', () => {
enabled_reports
:
noSecurityReportsEnabled
,
};
if
(
noSecurityReportsEnabled
?.
license_
management
)
{
if
(
noSecurityReportsEnabled
?.
license_
scanning
)
{
// Provide license report config if it's going to be rendered
gl
.
mrWidgetData
.
license_scanning
=
{
managed_licenses_path
:
`
${
TEST_HOST
}
/manage_license_api`
,
...
...
ee/spec/models/merge_request_spec.rb
View file @
ad3c27c0
...
...
@@ -115,8 +115,7 @@ describe MergeRequest do
:container_scanning
|
:with_container_scanning_reports
|
:container_scanning
:dast
|
:with_dast_reports
|
:dast
:dependency_scanning
|
:with_dependency_scanning_reports
|
:dependency_scanning
:license_management
|
:with_license_management_reports
|
:license_scanning
:license_management
|
:with_license_scanning_reports
|
:license_scanning
:license_scanning
|
:with_license_management_reports
|
:license_scanning
:license_scanning
|
:with_license_scanning_reports
|
:license_scanning
end
...
...
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