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
ab189d63
Commit
ab189d63
authored
Oct 05, 2020
by
Mehmet Emin INAC
Committed by
Imre Farkas
Oct 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change the Security dashboard path
parent
185b5541
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
41 additions
and
9 deletions
+41
-9
ee/app/helpers/security_helper.rb
ee/app/helpers/security_helper.rb
+1
-1
ee/app/views/dashboard/_nav_link_list.html.haml
ee/app/views/dashboard/_nav_link_list.html.haml
+1
-1
ee/app/views/layouts/instance_security.html.haml
ee/app/views/layouts/instance_security.html.haml
+1
-1
ee/app/views/layouts/nav/sidebar/_security.html.haml
ee/app/views/layouts/nav/sidebar/_security.html.haml
+3
-3
ee/changelogs/unreleased/245011_fix_security_dashboard_urls.yml
...ngelogs/unreleased/245011_fix_security_dashboard_urls.yml
+5
-0
ee/config/routes/security.rb
ee/config/routes/security.rb
+4
-2
ee/spec/helpers/security_helper_spec.rb
ee/spec/helpers/security_helper_spec.rb
+1
-1
ee/spec/routing/security_routing_spec.rb
ee/spec/routing/security_routing_spec.rb
+25
-0
No files found.
ee/app/helpers/security_helper.rb
View file @
ab189d63
...
...
@@ -9,7 +9,7 @@ module SecurityHelper
empty_state_svg_path:
image_path
(
'illustrations/operations-dashboard_empty.svg'
),
project_add_endpoint:
security_projects_path
,
project_list_endpoint:
security_projects_path
,
instance_dashboard_settings_path:
se
curity_settings
_dashboard_path
,
instance_dashboard_settings_path:
se
ttings_security
_dashboard_path
,
vulnerability_feedback_help_path:
help_page_path
(
'user/application_security/index'
,
anchor:
'interacting-with-the-vulnerabilities'
),
vulnerabilities_export_endpoint:
expose_path
(
api_v4_security_vulnerability_exports_path
)
}
...
...
ee/app/views/dashboard/_nav_link_list.html.haml
View file @
ab189d63
...
...
@@ -5,5 +5,5 @@
=
link_to
operations_path
,
class:
'dropdown-item'
,
data:
{
qa_selector:
'operations_link'
}
do
=
_
(
'Operations'
)
-
if
dashboard_nav_link?
(
:security
)
=
link_to
security_
root
_path
,
class:
'dropdown-item'
,
data:
{
qa_selector:
'security_link'
}
do
=
link_to
security_
dashboard
_path
,
class:
'dropdown-item'
,
data:
{
qa_selector:
'security_link'
}
do
=
_
(
'Security'
)
ee/app/views/layouts/instance_security.html.haml
View file @
ab189d63
-
page_title
_
(
'Security'
)
-
header_title
_
(
'Security'
),
security_
root
_path
-
header_title
_
(
'Security'
),
security_
dashboard
_path
-
nav
'security'
-
@left_sidebar
=
true
...
...
ee/app/views/layouts/nav/sidebar/_security.html.haml
View file @
ab189d63
.nav-sidebar
{
class:
(
"sidebar-collapsed-desktop"
if
collapsed_sidebar?
)
}
.nav-sidebar-inner-scroll
.context-header
=
link_to
security_
root
_path
,
title:
_
(
'Security Dashboard'
),
id:
'logo'
do
=
link_to
security_
dashboard
_path
,
title:
_
(
'Security Dashboard'
),
id:
'logo'
do
.avatar-container.s40.settings-avatar.rect-avatar
=
brand_header_logo
.sidebar-context-title
=
_
(
'Security'
)
%ul
.sidebar-top-level-items
=
nav_link
(
path:
%w[dashboard#show]
)
do
=
link_to
security_
root
_path
,
class:
'shortcuts-project rspec-project-link'
do
=
link_to
security_
dashboard
_path
,
class:
'shortcuts-project rspec-project-link'
do
.nav-icon-container
=
sprite_icon
(
'dashboard'
)
%span
.nav-item-name
...
...
@@ -20,7 +20,7 @@
%span
.nav-item-name
=
_
(
'Vulnerability Report'
)
=
nav_link
(
path:
%w[dashboard#settings]
)
do
=
link_to
se
curity_settings
_dashboard_path
,
class:
'shortcuts-project rspec-project-link'
do
=
link_to
se
ttings_security
_dashboard_path
,
class:
'shortcuts-project rspec-project-link'
do
.nav-icon-container
=
sprite_icon
(
'settings'
)
%span
.nav-item-name
...
...
ee/changelogs/unreleased/245011_fix_security_dashboard_urls.yml
0 → 100644
View file @
ab189d63
---
title
:
Change the instance security dashboard path as `/-/security/dashboard`
merge_request
:
43737
author
:
type
:
fixed
ee/config/routes/security.rb
View file @
ab189d63
# frozen_string_literal: true
namespace
:security
do
root
to:
'dashboard#show'
get
'dashboard/settings'
,
to:
'dashboard#settings'
,
as: :settings_dashboard
root
to:
redirect
(
'-/security/dashboard'
)
resource
:dashboard
,
only:
[
:show
],
controller: :dashboard
do
get
:settings
end
resources
:projects
,
only:
[
:index
,
:create
,
:destroy
]
resources
:vulnerabilities
,
only:
[
:index
]
end
ee/spec/helpers/security_helper_spec.rb
View file @
ab189d63
...
...
@@ -14,7 +14,7 @@ RSpec.describe SecurityHelper do
empty_state_svg_path:
image_path
(
'illustrations/operations-dashboard_empty.svg'
),
project_add_endpoint:
security_projects_path
,
project_list_endpoint:
security_projects_path
,
instance_dashboard_settings_path:
se
curity_settings
_dashboard_path
,
instance_dashboard_settings_path:
se
ttings_security
_dashboard_path
,
vulnerability_feedback_help_path:
help_page_path
(
'user/application_security/index'
,
anchor:
'interacting-with-the-vulnerabilities'
),
vulnerabilities_export_endpoint:
api_v4_security_vulnerability_exports_path
})
...
...
ee/spec/routing/security_routing_spec.rb
0 → 100644
View file @
ab189d63
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
'Security routing'
,
'routing'
do
describe
'root path'
do
include
RSpec
::
Rails
::
RequestExampleGroup
subject
{
get
(
'/-/security'
)
}
it
{
is_expected
.
to
redirect_to
(
'/-/security/dashboard'
)
}
end
describe
'/-/security/dashboard'
do
subject
{
get
(
'/-/security/dashboard'
)
}
it
{
is_expected
.
to
route_to
(
'security/dashboard#show'
)
}
end
describe
'/-/security/dashboard/settings'
do
subject
{
get
(
'/-/security/dashboard/settings'
)
}
it
{
is_expected
.
to
route_to
(
'security/dashboard#settings'
)
}
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