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
14c1e9e9
Commit
14c1e9e9
authored
Nov 24, 2021
by
Martin Wortschack
Committed by
Douglas Barbosa Alexandre
Nov 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move Value stream to top-level in analytics section of left sidebar nav
parent
5d14a7a6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
6 deletions
+21
-6
ee/lib/ee/sidebars/projects/menus/analytics_menu.rb
ee/lib/ee/sidebars/projects/menus/analytics_menu.rb
+1
-1
ee/lib/sidebars/groups/menus/analytics_menu.rb
ee/lib/sidebars/groups/menus/analytics_menu.rb
+1
-1
ee/spec/features/groups/navbar_spec.rb
ee/spec/features/groups/navbar_spec.rb
+1
-1
ee/spec/lib/sidebars/groups/menus/analytics_menu_spec.rb
ee/spec/lib/sidebars/groups/menus/analytics_menu_spec.rb
+4
-0
lib/sidebars/projects/menus/analytics_menu.rb
lib/sidebars/projects/menus/analytics_menu.rb
+1
-1
spec/support/helpers/navbar_structure_helper.rb
spec/support/helpers/navbar_structure_helper.rb
+11
-0
spec/support/shared_contexts/navbar_structure_context.rb
spec/support/shared_contexts/navbar_structure_context.rb
+2
-2
No files found.
ee/lib/ee/sidebars/projects/menus/analytics_menu.rb
View file @
14c1e9e9
...
...
@@ -11,13 +11,13 @@ module EE
def
configure_menu_items
return
false
unless
can?
(
context
.
current_user
,
:read_analytics
,
context
.
project
)
add_item
(
cycle_analytics_menu_item
)
add_item
(
ci_cd_analytics_menu_item
)
add_item
(
code_review_analytics_menu_item
)
add_item
(
insights_menu_item
)
add_item
(
issues_analytics_menu_item
)
add_item
(
merge_request_analytics_menu_item
)
add_item
(
repository_analytics_menu_item
)
add_item
(
cycle_analytics_menu_item
)
true
end
...
...
ee/lib/sidebars/groups/menus/analytics_menu.rb
View file @
14c1e9e9
...
...
@@ -8,6 +8,7 @@ module Sidebars
override
:configure_menu_items
def
configure_menu_items
add_item
(
cycle_analytics_menu_item
)
add_item
(
ci_cd_analytics_menu_item
)
add_item
(
contribution_analytics_menu_item
)
add_item
(
devops_adoption_menu_item
)
...
...
@@ -16,7 +17,6 @@ module Sidebars
add_item
(
merge_request_analytics_menu_item
)
add_item
(
productivity_analytics_menu_item
)
add_item
(
repository_analytics_menu_item
)
add_item
(
cycle_analytics_menu_item
)
true
end
...
...
ee/spec/features/groups/navbar_spec.rb
View file @
14c1e9e9
...
...
@@ -58,7 +58,7 @@ RSpec.describe 'Group navbar' do
before
do
stub_licensed_features
(
cycle_analytics_for_groups:
true
)
insert_
after
_sub_nav_item
(
insert_
before
_sub_nav_item
(
_
(
'Contribution'
),
within:
_
(
'Analytics'
),
new_sub_nav_item_name:
_
(
'Value stream'
)
...
...
ee/spec/lib/sidebars/groups/menus/analytics_menu_spec.rb
View file @
14c1e9e9
...
...
@@ -24,6 +24,10 @@ RSpec.describe Sidebars::Groups::Menus::AnalyticsMenu do
end
context
'when Value Stream is not visible'
do
before
do
stub_licensed_features
(
cycle_analytics_for_groups:
false
,
group_ci_cd_analytics:
true
)
end
it
'returns link to the the first visible menu item'
do
allow
(
menu
).
to
receive
(
:cycle_analytics_menu_item
).
and_return
(
double
(
render?:
false
))
...
...
lib/sidebars/projects/menus/analytics_menu.rb
View file @
14c1e9e9
...
...
@@ -10,9 +10,9 @@ module Sidebars
def
configure_menu_items
return
false
unless
can?
(
context
.
current_user
,
:read_analytics
,
context
.
project
)
add_item
(
cycle_analytics_menu_item
)
add_item
(
ci_cd_analytics_menu_item
)
add_item
(
repository_analytics_menu_item
)
add_item
(
cycle_analytics_menu_item
)
true
end
...
...
spec/support/helpers/navbar_structure_helper.rb
View file @
14c1e9e9
...
...
@@ -19,6 +19,17 @@ module NavbarStructureHelper
hash
[
:nav_sub_items
].
insert
(
index
+
1
,
new_sub_nav_item_name
)
end
def
insert_before_sub_nav_item
(
after_sub_nav_item_name
,
within
:,
new_sub_nav_item_name
:)
expect
(
structure
).
to
include
(
a_hash_including
(
nav_item:
within
))
hash
=
structure
.
find
{
|
h
|
h
[
:nav_item
]
==
within
if
h
}
expect
(
hash
).
to
have_key
(
:nav_sub_items
)
expect
(
hash
[
:nav_sub_items
]).
to
include
(
after_sub_nav_item_name
)
index
=
hash
[
:nav_sub_items
].
find_index
(
after_sub_nav_item_name
)
hash
[
:nav_sub_items
].
insert
(
index
,
new_sub_nav_item_name
)
end
def
insert_package_nav
(
within
)
insert_after_nav_item
(
within
,
...
...
spec/support/shared_contexts/navbar_structure_context.rb
View file @
14c1e9e9
...
...
@@ -94,11 +94,11 @@ RSpec.shared_context 'project navbar structure' do
{
nav_item:
_
(
'Analytics'
),
nav_sub_items:
[
_
(
'Value stream'
),
_
(
'CI/CD'
),
(
_
(
'Code review'
)
if
Gitlab
.
ee?
),
(
_
(
'Merge request'
)
if
Gitlab
.
ee?
),
_
(
'Repository'
),
_
(
'Value stream'
)
_
(
'Repository'
)
]
},
{
...
...
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