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
ecf0b833
Commit
ecf0b833
authored
Feb 01, 2022
by
Alan (Maciej) Paruszewski
Committed by
Natalia Tepluhina
Feb 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable Configure with a MR button for Container Scanning
Changelog: added EE: true
parent
d8b88f51
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
2 deletions
+27
-2
app/assets/javascripts/security_configuration/components/constants.js
...avascripts/security_configuration/components/constants.js
+4
-0
ee/app/assets/javascripts/security_configuration/components/constants.js
...avascripts/security_configuration/components/constants.js
+16
-1
ee/app/assets/javascripts/security_configuration/graphql/configure_container_scanning.mutation.graphql
...ion/graphql/configure_container_scanning.mutation.graphql
+6
-0
ee/spec/features/projects/security/user_views_security_configuration_spec.rb
...ojects/security/user_views_security_configuration_spec.rb
+1
-1
No files found.
app/assets/javascripts/security_configuration/components/constants.js
View file @
ecf0b833
...
@@ -217,6 +217,10 @@ export const securityFeatures = [
...
@@ -217,6 +217,10 @@ export const securityFeatures = [
helpPath
:
CONTAINER_SCANNING_HELP_PATH
,
helpPath
:
CONTAINER_SCANNING_HELP_PATH
,
configurationHelpPath
:
CONTAINER_SCANNING_CONFIG_HELP_PATH
,
configurationHelpPath
:
CONTAINER_SCANNING_CONFIG_HELP_PATH
,
type
:
REPORT_TYPE_CONTAINER_SCANNING
,
type
:
REPORT_TYPE_CONTAINER_SCANNING
,
// This field will eventually come from the backend, the progress is
// tracked in https://gitlab.com/gitlab-org/gitlab/-/issues/331621
canEnableByMergeRequest
:
true
,
},
},
{
{
name
:
CLUSTER_IMAGE_SCANNING_NAME
,
name
:
CLUSTER_IMAGE_SCANNING_NAME
,
...
...
ee/app/assets/javascripts/security_configuration/components/constants.js
View file @
ecf0b833
import
{
s__
}
from
'
~/locale
'
;
import
{
s__
}
from
'
~/locale
'
;
import
{
featureToMutationMap
as
featureToMutationMapCE
}
from
'
~/security_configuration/components/constants
'
;
import
{
featureToMutationMap
as
featureToMutationMapCE
}
from
'
~/security_configuration/components/constants
'
;
import
{
REPORT_TYPE_DEPENDENCY_SCANNING
}
from
'
~/vue_shared/security_reports/constants
'
;
import
{
REPORT_TYPE_DEPENDENCY_SCANNING
,
REPORT_TYPE_CONTAINER_SCANNING
,
}
from
'
~/vue_shared/security_reports/constants
'
;
import
configureDependencyScanningMutation
from
'
../graphql/configure_dependency_scanning.mutation.graphql
'
;
import
configureDependencyScanningMutation
from
'
../graphql/configure_dependency_scanning.mutation.graphql
'
;
import
configureContainerScanningMutation
from
'
../graphql/configure_container_scanning.mutation.graphql
'
;
export
const
SMALL
=
'
SMALL
'
;
export
const
SMALL
=
'
SMALL
'
;
export
const
MEDIUM
=
'
MEDIUM
'
;
export
const
MEDIUM
=
'
MEDIUM
'
;
...
@@ -32,6 +36,17 @@ export const featureToMutationMap = {
...
@@ -32,6 +36,17 @@ export const featureToMutationMap = {
},
},
}),
}),
},
},
[
REPORT_TYPE_CONTAINER_SCANNING
]:
{
mutationId
:
'
configureContainerScanning
'
,
getMutationPayload
:
(
projectPath
)
=>
({
mutation
:
configureContainerScanningMutation
,
variables
:
{
input
:
{
projectPath
,
},
},
}),
},
};
};
export
const
CONFIGURATION_SNIPPET_MODAL_ID
=
'
CONFIGURATION_SNIPPET_MODAL_ID
'
;
export
const
CONFIGURATION_SNIPPET_MODAL_ID
=
'
CONFIGURATION_SNIPPET_MODAL_ID
'
;
ee/app/assets/javascripts/security_configuration/graphql/configure_container_scanning.mutation.graphql
0 → 100644
View file @
ecf0b833
mutation
configureContainerScanning
(
$input
:
ConfigureContainerScanningInput
!)
{
configureContainerScanning
(
input
:
$input
)
{
successPath
errors
}
}
ee/spec/features/projects/security/user_views_security_configuration_spec.rb
View file @
ecf0b833
...
@@ -132,7 +132,7 @@ RSpec.describe 'User sees Security Configuration table', :js do
...
@@ -132,7 +132,7 @@ RSpec.describe 'User sees Security Configuration table', :js do
within_container_scanning_card
do
within_container_scanning_card
do
expect
(
page
).
to
have_text
(
'Container Scanning'
)
expect
(
page
).
to
have_text
(
'Container Scanning'
)
expect
(
page
).
to
have_text
(
'Not enabled'
)
expect
(
page
).
to
have_text
(
'Not enabled'
)
expect
(
page
).
to
have_
link
(
'Configuration guide
'
)
expect
(
page
).
to
have_
button
(
'Configure with a merge request
'
)
end
end
end
end
end
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