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
1bf27b46
Commit
1bf27b46
authored
Mar 18, 2020
by
Gilang Gumilar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make 'Value Stream' the top item in project-level analytics sidebar menu
parent
281c8edd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
18 deletions
+18
-18
app/views/layouts/nav/sidebar/_analytics_links.html.haml
app/views/layouts/nav/sidebar/_analytics_links.html.haml
+1
-1
changelogs/unreleased/210317-rearrange-group-level-analytics-sidebar-menu.yml
...d/210317-rearrange-group-level-analytics-sidebar-menu.yml
+1
-1
ee/app/helpers/ee/analytics_navbar_helper.rb
ee/app/helpers/ee/analytics_navbar_helper.rb
+16
-16
No files found.
app/views/layouts/nav/sidebar/_analytics_links.html.haml
View file @
1bf27b46
-
navbar_links
=
links
.
sort_by
{
|
link
|
[
link
.
link_to_options
.
fetch
(
:data
,
{}).
fetch
(
:
index
,
0
),
link
.
title
]
}
-
navbar_links
=
links
.
sort_by
{
|
link
|
[
link
.
link_to_options
.
fetch
(
:data
,
{}).
fetch
(
:
priority
,
0
),
link
.
title
]
}
-
all_paths
=
navbar_links
.
map
(
&
:path
)
-
all_paths
=
navbar_links
.
map
(
&
:path
)
-
if
navbar_links
.
any?
-
if
navbar_links
.
any?
...
...
changelogs/unreleased/210317-rearrange-group-level-analytics-sidebar-menu.yml
View file @
1bf27b46
---
---
title
:
Rearrange
group-level analytics sidebar menu.
title
:
Make "Value Stream" the top item in
group-level analytics sidebar menu.
merge_request
:
27277
merge_request
:
27277
author
:
Gilang Gumilar
author
:
Gilang Gumilar
type
:
fixed
type
:
fixed
ee/app/helpers/ee/analytics_navbar_helper.rb
View file @
1bf27b46
...
@@ -16,11 +16,11 @@ module EE
...
@@ -16,11 +16,11 @@ module EE
override
:group_analytics_navbar_links
override
:group_analytics_navbar_links
def
group_analytics_navbar_links
(
group
,
current_user
)
def
group_analytics_navbar_links
(
group
,
current_user
)
super
+
[
super
+
[
group_cycle_analytics_navbar_link
(
group
,
current_user
,
0
),
group_cycle_analytics_navbar_link
(
group
,
current_user
,
-
1
),
issues_analytics_navbar_link
(
group
,
current_user
,
1
),
contribution_analytics_navbar_link
(
group
,
current_user
),
contribution_analytics_navbar_link
(
group
,
current_user
,
2
),
group_insights_navbar_link
(
group
,
current_user
),
group_insights_navbar_link
(
group
,
current_user
,
3
),
issues_analytics_navbar_link
(
group
,
current_user
),
productivity_analytics_navbar_link
(
group
,
current_user
,
4
)
productivity_analytics_navbar_link
(
group
,
current_user
)
].
compact
].
compact
end
end
...
@@ -37,58 +37,58 @@ module EE
...
@@ -37,58 +37,58 @@ module EE
)
)
end
end
def
group_cycle_analytics_navbar_link
(
group
,
current_user
,
index
=
0
)
def
group_cycle_analytics_navbar_link
(
group
,
current_user
,
priority
=
0
)
return
unless
group_sidebar_link?
(
:cycle_analytics
)
return
unless
group_sidebar_link?
(
:cycle_analytics
)
navbar_sub_item
(
navbar_sub_item
(
title:
_
(
'Value Stream'
),
title:
_
(
'Value Stream'
),
path:
'groups/analytics/cycle_analytics#show'
,
path:
'groups/analytics/cycle_analytics#show'
,
link:
group_analytics_cycle_analytics_path
(
group
),
link:
group_analytics_cycle_analytics_path
(
group
),
link_to_options:
{
data:
{
index:
index
}
}
link_to_options:
{
data:
{
priority:
priority
}
}
)
)
end
end
def
productivity_analytics_navbar_link
(
group
,
current_user
,
index
=
0
)
def
productivity_analytics_navbar_link
(
group
,
current_user
,
priority
=
0
)
return
unless
group_sidebar_link?
(
:productivity_analytics
)
return
unless
group_sidebar_link?
(
:productivity_analytics
)
navbar_sub_item
(
navbar_sub_item
(
title:
_
(
'Productivity'
),
title:
_
(
'Productivity'
),
path:
'groups/analytics/productivity_analytics#show'
,
path:
'groups/analytics/productivity_analytics#show'
,
link:
group_analytics_productivity_analytics_path
(
group
),
link:
group_analytics_productivity_analytics_path
(
group
),
link_to_options:
{
data:
{
index:
index
}
}
link_to_options:
{
data:
{
priority:
priority
}
}
)
)
end
end
def
contribution_analytics_navbar_link
(
group
,
current_user
,
index
=
0
)
def
contribution_analytics_navbar_link
(
group
,
current_user
,
priority
=
0
)
return
unless
group_sidebar_link?
(
:contribution_analytics
)
return
unless
group_sidebar_link?
(
:contribution_analytics
)
navbar_sub_item
(
navbar_sub_item
(
title:
_
(
'Contribution'
),
title:
_
(
'Contribution'
),
path:
'groups/contribution_analytics#show'
,
path:
'groups/contribution_analytics#show'
,
link:
group_contribution_analytics_path
(
group
),
link:
group_contribution_analytics_path
(
group
),
link_to_options:
{
data:
{
placement:
'right'
,
qa_selector:
'contribution_analytics_link'
,
index:
index
}
}
link_to_options:
{
data:
{
placement:
'right'
,
qa_selector:
'contribution_analytics_link'
,
priority:
priority
}
}
)
)
end
end
def
group_insights_navbar_link
(
group
,
current_user
,
index
=
0
)
def
group_insights_navbar_link
(
group
,
current_user
,
priority
=
0
)
return
unless
group_sidebar_link?
(
:group_insights
)
return
unless
group_sidebar_link?
(
:group_insights
)
navbar_sub_item
(
navbar_sub_item
(
title:
_
(
'Insights'
),
title:
_
(
'Insights'
),
path:
'groups/insights#show'
,
path:
'groups/insights#show'
,
link:
group_insights_path
(
group
),
link:
group_insights_path
(
group
),
link_to_options:
{
class:
'shortcuts-group-insights'
,
data:
{
qa_selector:
'group_insights_link'
,
index:
index
}
}
link_to_options:
{
class:
'shortcuts-group-insights'
,
data:
{
qa_selector:
'group_insights_link'
,
priority:
priority
}
}
)
)
end
end
def
issues_analytics_navbar_link
(
group
,
current_user
,
index
=
0
)
def
issues_analytics_navbar_link
(
group
,
current_user
,
priority
=
0
)
return
unless
group_sidebar_link?
(
:analytics
)
return
unless
group_sidebar_link?
(
:analytics
)
navbar_sub_item
(
navbar_sub_item
(
title:
_
(
'Issues'
),
title:
_
(
'Issues'
),
path:
'issues_analytics#show'
,
path:
'issues_analytics#show'
,
link:
group_issues_analytics_path
(
group
),
link:
group_issues_analytics_path
(
group
),
link_to_options:
{
data:
{
index:
index
}
}
link_to_options:
{
data:
{
priority:
priority
}
}
)
)
end
end
...
@@ -108,7 +108,7 @@ module EE
...
@@ -108,7 +108,7 @@ module EE
navbar_sub_item
(
navbar_sub_item
(
title:
_
(
'Code Review'
),
title:
_
(
'Code Review'
),
path:
'projects/analytics/code_reviews#
index
'
,
path:
'projects/analytics/code_reviews#
priority
'
,
link:
project_analytics_code_reviews_path
(
project
)
link:
project_analytics_code_reviews_path
(
project
)
)
)
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