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
da58b115
Commit
da58b115
authored
Dec 10, 2020
by
Dheeraj Joshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix subnavigation paths for On-demand Scans & profiles
parent
fc8fac12
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
21 deletions
+46
-21
ee/app/helpers/ee/projects_helper.rb
ee/app/helpers/ee/projects_helper.rb
+17
-10
ee/app/views/layouts/nav/sidebar/_project_security_link.html.haml
...iews/layouts/nav/sidebar/_project_security_link.html.haml
+1
-1
ee/changelogs/unreleased/djadmin-fix-dast-navigation.yml
ee/changelogs/unreleased/djadmin-fix-dast-navigation.yml
+5
-0
ee/spec/helpers/projects_helper_spec.rb
ee/spec/helpers/projects_helper_spec.rb
+23
-10
No files found.
ee/app/helpers/ee/projects_helper.rb
View file @
da58b115
...
...
@@ -167,11 +167,11 @@ module EE
projects/security/vulnerability_report#index
projects/security/dashboard#index
projects/on_demand_scans#index
projects/
dast_profiles#index
projects/dast_site_profiles#new
projects/dast_site_profiles#edit
projects/dast_scanner_profiles#new
projects/dast_scanner_profiles#edit
projects/
security/dast_profiles#show
projects/
security/
dast_site_profiles#new
projects/
security/
dast_site_profiles#edit
projects/
security/
dast_scanner_profiles#new
projects/
security/
dast_scanner_profiles#edit
projects/dependencies#index
projects/licenses#index
projects/threat_monitoring#show
...
...
@@ -189,11 +189,18 @@ module EE
def
sidebar_on_demand_scans_paths
%w[
projects/on_demand_scans#index
projects/dast_profiles#index
projects/dast_site_profiles#new
projects/dast_site_profiles#edit
projects/dast_scanner_profiles#new
projects/dast_scanner_profiles#edit
]
end
def
sidebar_security_configuration_paths
%w[
projects/security/configuration#show
projects/security/sast_configuration#show
projects/security/dast_profiles#show
projects/security/dast_site_profiles#new
projects/security/dast_site_profiles#edit
projects/security/dast_scanner_profiles#new
projects/security/dast_scanner_profiles#edit
]
end
...
...
ee/app/views/layouts/nav/sidebar/_project_security_link.html.haml
View file @
da58b115
...
...
@@ -46,7 +46,7 @@
%span
=
_
(
'Threat Monitoring'
)
-
if
project_nav_tab?
(
:security_configuration
)
=
nav_link
(
path:
[
'projects/security/configuration#show'
,
'projects/security/sast_configuration#show'
]
)
do
=
nav_link
(
path:
sidebar_security_configuration_paths
)
do
=
link_to
project_security_configuration_path
(
@project
),
title:
_
(
'Configuration'
),
data:
{
qa_selector:
'security_configuration_link'
}
do
%span
=
_
(
'Configuration'
)
...
...
ee/changelogs/unreleased/djadmin-fix-dast-navigation.yml
0 → 100644
View file @
da58b115
---
title
:
Fix sidebar navigation for On-demand scans
merge_request
:
49719
author
:
type
:
fixed
ee/spec/helpers/projects_helper_spec.rb
View file @
da58b115
...
...
@@ -210,11 +210,11 @@ RSpec.describe ProjectsHelper do
projects/security/vulnerability_report#index
projects/security/dashboard#index
projects/on_demand_scans#index
projects/
dast_profiles#index
projects/dast_site_profiles#new
projects/dast_site_profiles#edit
projects/dast_scanner_profiles#new
projects/dast_scanner_profiles#edit
projects/
security/dast_profiles#show
projects/
security/
dast_site_profiles#new
projects/
security/
dast_site_profiles#edit
projects/
security/
dast_scanner_profiles#new
projects/
security/
dast_scanner_profiles#edit
projects/dependencies#index
projects/licenses#index
projects/threat_monitoring#show
...
...
@@ -232,11 +232,6 @@ RSpec.describe ProjectsHelper do
let
(
:expected_on_demand_scans_paths
)
do
%w[
projects/on_demand_scans#index
projects/dast_profiles#index
projects/dast_site_profiles#new
projects/dast_site_profiles#edit
projects/dast_scanner_profiles#new
projects/dast_scanner_profiles#edit
]
end
...
...
@@ -245,6 +240,24 @@ RSpec.describe ProjectsHelper do
it
{
is_expected
.
to
eq
(
expected_on_demand_scans_paths
)
}
end
describe
'#sidebar_security_configuration_paths'
do
let
(
:expected_security_configuration_paths
)
do
%w[
projects/security/configuration#show
projects/security/sast_configuration#show
projects/security/dast_profiles#show
projects/security/dast_site_profiles#new
projects/security/dast_site_profiles#edit
projects/security/dast_scanner_profiles#new
projects/security/dast_scanner_profiles#edit
]
end
subject
{
helper
.
sidebar_security_configuration_paths
}
it
{
is_expected
.
to
eq
(
expected_security_configuration_paths
)
}
end
describe
'#get_project_nav_tabs'
do
using
RSpec
::
Parameterized
::
TableSyntax
...
...
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