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
6d1c1a57
Commit
6d1c1a57
authored
Mar 24, 2021
by
Dheeraj Joshi
Committed by
Martin Wortschack
Mar 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tab anchor link for Saved Scans
parent
62a3697e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
7 deletions
+14
-7
ee/app/assets/javascripts/security_configuration/dast_profiles/components/dast_profiles.vue
..._configuration/dast_profiles/components/dast_profiles.vue
+5
-6
ee/app/assets/javascripts/security_configuration/dast_profiles/settings/profiles.js
...security_configuration/dast_profiles/settings/profiles.js
+3
-0
ee/changelogs/unreleased/djadmin-adjust-anchor-dast-scans.yml
...hangelogs/unreleased/djadmin-adjust-anchor-dast-scans.yml
+5
-0
ee/spec/frontend/security_configuration/dast_profiles/components/dast_profiles_spec.js
...figuration/dast_profiles/components/dast_profiles_spec.js
+1
-1
No files found.
ee/app/assets/javascripts/security_configuration/dast_profiles/components/dast_profiles.vue
View file @
6d1c1a57
<
script
>
import
{
GlDropdown
,
GlDropdownItem
,
GlTab
,
GlTabs
}
from
'
@gitlab/ui
'
;
import
*
as
Sentry
from
'
@sentry/browser
'
;
import
{
camelCase
,
kebabCase
}
from
'
lodash
'
;
import
{
getLocationHash
}
from
'
~/lib/utils/url_utility
'
;
import
{
__
,
s__
}
from
'
~/locale
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
...
...
@@ -45,17 +44,17 @@ export default {
},
tabIndex
:
{
get
()
{
const
activeTabIndex
=
Object
.
keys
(
this
.
profileSettings
).
indexOf
(
camelCase
(
getLocationHash
()
),
const
activeTabIndex
=
Object
.
values
(
this
.
profileSettings
).
findIndex
(
({
tabName
})
=>
tabName
===
getLocationHash
(
),
);
return
Math
.
max
(
0
,
activeTabIndex
);
},
set
(
newTabIndex
)
{
const
profileTypeName
=
Object
.
key
s
(
this
.
profileSettings
)[
newTabIndex
];
const
{
tabName
}
=
Object
.
value
s
(
this
.
profileSettings
)[
newTabIndex
];
if
(
profileType
Name
)
{
window
.
location
.
hash
=
kebabCase
(
profileTypeName
)
;
if
(
tab
Name
)
{
window
.
location
.
hash
=
tabName
;
}
},
},
...
...
ee/app/assets/javascripts/security_configuration/dast_profiles/settings/profiles.js
View file @
6d1c1a57
...
...
@@ -13,6 +13,7 @@ import { s__ } from '~/locale';
export
const
getProfileSettings
=
({
createNewProfilePaths
})
=>
({
dastProfiles
:
{
profileType
:
'
dastProfiles
'
,
tabName
:
'
saved-scans
'
,
createNewProfilePath
:
createNewProfilePaths
.
savedScan
,
graphQL
:
{
query
:
dastProfilesQuery
,
...
...
@@ -56,6 +57,7 @@ export const getProfileSettings = ({ createNewProfilePaths }) => ({
},
siteProfiles
:
{
profileType
:
'
siteProfiles
'
,
tabName
:
'
site-profiles
'
,
createNewProfilePath
:
createNewProfilePaths
.
siteProfile
,
graphQL
:
{
query
:
dastSiteProfilesQuery
,
...
...
@@ -90,6 +92,7 @@ export const getProfileSettings = ({ createNewProfilePaths }) => ({
},
scannerProfiles
:
{
profileType
:
'
scannerProfiles
'
,
tabName
:
'
scanner-profiles
'
,
createNewProfilePath
:
createNewProfilePaths
.
scannerProfile
,
graphQL
:
{
query
:
dastScannerProfilesQuery
,
...
...
ee/changelogs/unreleased/djadmin-adjust-anchor-dast-scans.yml
0 → 100644
View file @
6d1c1a57
---
title
:
Update tab links for DAST Saved Scans
merge_request
:
57205
author
:
type
:
changed
ee/spec/frontend/security_configuration/dast_profiles/components/dast_profiles_spec.js
View file @
6d1c1a57
...
...
@@ -148,7 +148,7 @@ describe('EE - DastProfiles', () => {
describe
.
each
`
tabName | index | givenLocationHash
${
'
Saved Scans
'
}
|
${
0
}
|
${
'
dast-profile
s
'
}
${
'
Saved Scans
'
}
|
${
0
}
|
${
'
saved-scan
s
'
}
${
'
Site Profiles
'
}
|
${
1
}
|
${
'
site-profiles
'
}
${
'
Scanner Profiles
'
}
|
${
2
}
|
${
'
scanner-profiles
'
}
`
(
'
with location hash set to "$givenLocationHash"
'
,
({
tabName
,
index
,
givenLocationHash
})
=>
{
...
...
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