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
26a1fed5
Commit
26a1fed5
authored
Aug 27, 2020
by
Dave Pisek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Final polish before review
* Move strings to $options.i18n * Renaming * Misc
parent
c2ac9042
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
19 deletions
+24
-19
ee/app/assets/javascripts/dast_profiles/components/dast_profiles.vue
...ts/javascripts/dast_profiles/components/dast_profiles.vue
+14
-13
ee/app/assets/javascripts/dast_profiles/dast_profiles_bundle.js
.../assets/javascripts/dast_profiles/dast_profiles_bundle.js
+1
-1
ee/app/assets/javascripts/dast_profiles/settings/profiles.js
ee/app/assets/javascripts/dast_profiles/settings/profiles.js
+4
-4
ee/spec/frontend/dast_profiles/components/dast_profiles_spec.js
...c/frontend/dast_profiles/components/dast_profiles_spec.js
+1
-1
ee/spec/views/projects/dast_profiles/index.html.haml_spec.rb
ee/spec/views/projects/dast_profiles/index.html.haml_spec.rb
+4
-0
No files found.
ee/app/assets/javascripts/dast_profiles/components/dast_profiles.vue
View file @
26a1fed5
...
...
@@ -19,7 +19,7 @@ export default {
},
mixins
:
[
glFeatureFlagMixin
()],
props
:
{
n
ewProfilePaths
:
{
createN
ewProfilePaths
:
{
type
:
Object
,
required
:
true
,
validator
:
({
scannerProfile
,
siteProfile
})
=>
...
...
@@ -67,11 +67,11 @@ export default {
},
computed
:
{
profileSettings
()
{
const
{
glFeatures
,
n
ewProfilePaths
}
=
this
;
const
{
glFeatures
,
createN
ewProfilePaths
}
=
this
;
return
getProfileSettings
({
glFeatures
,
options
:
{
n
ewProfilePaths
},
options
:
{
createN
ewProfilePaths
},
});
},
hasMoreSiteProfiles
()
{
...
...
@@ -166,6 +166,11 @@ export default {
},
profilesPerPage
:
10
,
i18n
:
{
heading
:
s__
(
'
DastProfiles|Manage Profiles
'
),
newProfileDropdownLabel
:
s__
(
'
DastProfiles|New Profile
'
),
subHeading
:
s__
(
'
DastProfiles|Save commonly used configurations for target sites and scan specifications as profiles. Use these with an on-demand scan.
'
,
),
errorMessages
:
{
fetchNetworkError
:
s__
(
'
DastProfiles|Could not fetch site profiles. Please refresh the page, or try again later.
'
,
...
...
@@ -184,29 +189,25 @@ export default {
<header>
<div
class=
"gl-display-flex gl-align-items-center gl-pt-6 gl-pb-4"
>
<h2
class=
"my-0"
>
{{
s__
(
'
DastProfiles|Manage Profiles
'
)
}}
{{
$options
.
i18n
.
heading
}}
</h2>
<gl-dropdown
:text=
"s__('DastProfiles|New Profile')"
right
:text=
"$options.i18n.newProfileDropdownLabel"
variant=
"success"
right
class=
"gl-ml-auto"
>
<gl-dropdown-item
v-for=
"
{ i18n,
n
ewProfilePath, key } in profileSettings"
v-for=
"
{ i18n,
createN
ewProfilePath, key } in profileSettings"
:key="key"
:href="
n
ewProfilePath"
:href="
createN
ewProfilePath"
>
{{
i18n
.
title
}}
</gl-dropdown-item>
</gl-dropdown>
</div>
<p>
{{
s__
(
'
DastProfiles|Save commonly used configurations for target sites and scan specifications as profiles. Use these with an on-demand scan.
'
,
)
}}
{{
$options
.
i18n
.
subHeading
}}
</p>
</header>
...
...
ee/app/assets/javascripts/dast_profiles/dast_profiles_bundle.js
View file @
26a1fed5
...
...
@@ -14,7 +14,7 @@ export default () => {
}
=
el
;
const
props
=
{
n
ewProfilePaths
:
{
createN
ewProfilePaths
:
{
scannerProfile
:
newDastScannerProfilePath
,
siteProfile
:
newDastSiteProfilePath
,
},
...
...
ee/app/assets/javascripts/dast_profiles/settings/profiles.js
View file @
26a1fed5
...
...
@@ -5,21 +5,21 @@ const hasNoFeatureFlagOrEnabled = glFeatures => ([, { featureFlag }]) => {
return
true
;
}
return
glFeatures
[
featureFlag
]
;
return
Boolean
(
glFeatures
[
featureFlag
])
;
};
export
default
function
({
glFeatures
,
options
:
{
n
ewProfilePaths
}
=
{}
})
{
export
default
function
({
glFeatures
,
options
:
{
createN
ewProfilePaths
}
=
{}
})
{
const
settings
=
{
siteProfiles
:
{
key
:
'
siteProfiles
'
,
newProfilePath
:
n
ewProfilePaths
.
siteProfile
,
createNewProfilePath
:
createN
ewProfilePaths
.
siteProfile
,
i18n
:
{
title
:
s__
(
'
DastProfiles|Site Profile
'
),
},
},
scannerProfiles
:
{
key
:
'
scannerProfiles
'
,
newProfilePath
:
n
ewProfilePaths
.
scannerProfile
,
createNewProfilePath
:
createN
ewProfilePaths
.
scannerProfile
,
featureFlag
:
'
securityOnDemandScansScannerProfiles
'
,
i18n
:
{
title
:
s__
(
'
DastProfiles|Scanner Profile
'
),
...
...
ee/spec/frontend/dast_profiles/components/dast_profiles_spec.js
View file @
26a1fed5
...
...
@@ -14,7 +14,7 @@ describe('EE - DastProfiles', () => {
const
createComponentFactory
=
(
mountFn
=
shallowMount
)
=>
(
options
=
{})
=>
{
const
defaultProps
=
{
n
ewProfilePaths
:
{
createN
ewProfilePaths
:
{
scannerProfile
:
TEST_NEW_DAST_SCANNER_PROFILE_PATH
,
siteProfile
:
TEST_NEW_DAST_SITE_PROFILE_PATH
,
},
...
...
ee/spec/views/projects/dast_profiles/index.html.haml_spec.rb
View file @
26a1fed5
...
...
@@ -16,6 +16,10 @@ RSpec.describe "projects/dast_profiles/index", type: :view do
expect
(
rendered
).
to
include
'/on_demand_scans/profiles/dast_site_profiles/new'
end
it
'passes new dast scanner profile path'
do
expect
(
rendered
).
to
include
'/on_demand_scans/profiles/dast_scanner_profiles/new'
end
it
'passes project\'s full path'
do
expect
(
rendered
).
to
include
@project
.
path_with_namespace
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