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
2c640ee6
Commit
2c640ee6
authored
Mar 12, 2021
by
Dheeraj Joshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move constants to a separate file
parent
c2d881c2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
6 deletions
+12
-6
ee/app/assets/javascripts/on_demand_scans/components/on_demand_scans_form.vue
...ripts/on_demand_scans/components/on_demand_scans_form.vue
+3
-1
ee/app/assets/javascripts/security_configuration/dast_site_profiles_form/components/dast_site_profile_form.vue
..._site_profiles_form/components/dast_site_profile_form.vue
+5
-4
ee/app/assets/javascripts/security_configuration/dast_site_profiles_form/constants.js
...curity_configuration/dast_site_profiles_form/constants.js
+3
-0
ee/spec/frontend/on_demand_scans/components/on_demand_scans_form_spec.js
...d/on_demand_scans/components/on_demand_scans_form_spec.js
+1
-1
No files found.
ee/app/assets/javascripts/on_demand_scans/components/on_demand_scans_form.vue
View file @
2c640ee6
...
...
@@ -17,6 +17,7 @@ import {
SCAN_TYPE_LABEL
,
SCAN_TYPE
,
}
from
'
ee/security_configuration/dast_scanner_profiles/constants
'
;
import
{
EXCLUDED_URLS_SEPARATOR
}
from
'
ee/security_configuration/dast_site_profiles_form/constants
'
;
import
{
DAST_SITE_VALIDATION_STATUS
}
from
'
ee/security_configuration/dast_site_validation/constants
'
;
import
{
initFormField
}
from
'
ee/security_configuration/utils
'
;
import
{
convertToGraphQLId
}
from
'
~/graphql_shared/utils
'
;
...
...
@@ -319,6 +320,7 @@ export default {
},
},
ON_DEMAND_SCANS_STORAGE_KEY
,
EXCLUDED_URLS_SEPARATOR
,
};
</
script
>
...
...
@@ -512,7 +514,7 @@ export default {
<div
class=
"row"
>
<profile-selector-summary-cell
:label=
"s__('DastProfiles|Excluded URLs')"
:value=
"selectedSiteProfile.excludedUrls"
:value=
"selectedSiteProfile.excludedUrls
.join($options.EXCLUDED_URLS_SEPARATOR)
"
/>
<profile-selector-summary-cell
:label=
"s__('DastProfiles|Request headers')"
...
...
ee/app/assets/javascripts/security_configuration/dast_site_profiles_form/components/dast_site_profile_form.vue
View file @
2c640ee6
...
...
@@ -18,14 +18,15 @@ import { __, s__, n__, sprintf } from '~/locale';
import
validation
from
'
~/vue_shared/directives/validation
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
tooltipIcon
from
'
../../dast_scanner_profiles/components/tooltip_icon.vue
'
;
import
{
MAX_CHAR_LIMIT_EXCLUDED_URLS
,
MAX_CHAR_LIMIT_REQUEST_HEADERS
,
EXCLUDED_URLS_SEPARATOR
,
}
from
'
../constants
'
;
import
dastSiteProfileCreateMutation
from
'
../graphql/dast_site_profile_create.mutation.graphql
'
;
import
dastSiteProfileUpdateMutation
from
'
../graphql/dast_site_profile_update.mutation.graphql
'
;
import
DastSiteAuthSection
from
'
./dast_site_auth_section.vue
'
;
const
MAX_CHAR_LIMIT_EXCLUDED_URLS
=
2048
;
const
MAX_CHAR_LIMIT_REQUEST_HEADERS
=
2048
;
const
EXCLUDED_URLS_SEPARATOR
=
'
,
'
;
export
default
{
name
:
'
DastSiteProfileForm
'
,
components
:
{
...
...
ee/app/assets/javascripts/security_configuration/dast_site_profiles_form/constants.js
0 → 100644
View file @
2c640ee6
export
const
MAX_CHAR_LIMIT_EXCLUDED_URLS
=
2048
;
export
const
MAX_CHAR_LIMIT_REQUEST_HEADERS
=
2048
;
export
const
EXCLUDED_URLS_SEPARATOR
=
'
,
'
;
ee/spec/frontend/on_demand_scans/components/on_demand_scans_form_spec.js
View file @
2c640ee6
...
...
@@ -536,7 +536,7 @@ describe('OnDemandScansForm', () => {
const
summary
=
subject
.
find
(
SiteProfileSelector
).
text
();
expect
(
summary
).
toMatch
(
authEnabledProfile
.
targetUrl
);
expect
(
summary
).
toMatch
(
authEnabledProfile
.
excludedUrls
);
expect
(
summary
).
toMatch
(
authEnabledProfile
.
excludedUrls
.
join
(
'
,
'
)
);
expect
(
summary
).
toMatch
(
authEnabledProfile
.
requestHeaders
);
expect
(
summary
).
toMatch
(
authEnabledProfile
.
auth
.
url
);
expect
(
summary
).
toMatch
(
authEnabledProfile
.
auth
.
username
);
...
...
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