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
296e669a
Commit
296e669a
authored
Apr 05, 2020
by
Gilang Gumilar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert priority ordering
parent
0a9e97f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
16 deletions
+13
-16
app/helpers/analytics_navbar_helper.rb
app/helpers/analytics_navbar_helper.rb
+7
-8
ee/app/helpers/ee/analytics_navbar_helper.rb
ee/app/helpers/ee/analytics_navbar_helper.rb
+6
-8
No files found.
app/helpers/analytics_navbar_helper.rb
View file @
296e669a
...
...
@@ -14,7 +14,7 @@ module AnalyticsNavbarHelper
def
project_analytics_navbar_links
(
project
,
current_user
)
[
cycle_analytics_navbar_link
(
project
,
current_user
,
-
1
),
cycle_analytics_navbar_link
(
project
,
current_user
),
repository_analytics_navbar_link
(
project
,
current_user
),
ci_cd_analytics_navbar_link
(
project
,
current_user
)
].
compact
...
...
@@ -30,37 +30,36 @@ module AnalyticsNavbarHelper
NavbarSubItem
.
new
(
args
)
end
def
cycle_analytics_navbar_link
(
project
,
current_user
,
priority
=
0
)
def
cycle_analytics_navbar_link
(
project
,
current_user
)
return
unless
project_nav_tab?
(
:cycle_analytics
)
navbar_sub_item
(
title:
_
(
'Value Stream'
),
path:
'cycle_analytics#show'
,
link:
project_cycle_analytics_path
(
project
),
link_to_options:
{
class:
'shortcuts-project-cycle-analytics'
,
data:
{
priority:
priority
}
}
link_to_options:
{
class:
'shortcuts-project-cycle-analytics'
}
)
end
def
repository_analytics_navbar_link
(
project
,
current_user
,
priority
=
0
)
def
repository_analytics_navbar_link
(
project
,
current_user
)
return
if
project
.
empty_repo?
navbar_sub_item
(
title:
_
(
'Repository'
),
path:
'graphs#charts'
,
link:
charts_project_graph_path
(
project
,
current_ref
),
link_to_options:
{
class:
'shortcuts-repository-charts'
,
data:
{
priority:
priority
}
}
link_to_options:
{
class:
'shortcuts-repository-charts'
}
)
end
def
ci_cd_analytics_navbar_link
(
project
,
current_user
,
priority
=
0
)
def
ci_cd_analytics_navbar_link
(
project
,
current_user
)
return
unless
project_nav_tab?
(
:pipelines
)
return
unless
project
.
feature_available?
(
:builds
,
current_user
)
||
!
project
.
empty_repo?
navbar_sub_item
(
title:
_
(
'CI / CD'
),
path:
'pipelines#charts'
,
link:
charts_project_pipelines_path
(
project
),
link_to_options:
{
data:
{
priority:
priority
}
}
link:
charts_project_pipelines_path
(
project
)
)
end
end
...
...
ee/app/helpers/ee/analytics_navbar_helper.rb
View file @
296e669a
...
...
@@ -26,15 +26,14 @@ module EE
private
def
project_issues_analytics_navbar_link
(
project
,
current_user
,
priority
=
0
)
def
project_issues_analytics_navbar_link
(
project
,
current_user
)
return
unless
::
Feature
.
enabled?
(
:project_level_issues_analytics
,
project
,
default_enabled:
true
)
return
unless
project_nav_tab?
(
:issues_analytics
)
navbar_sub_item
(
title:
_
(
'Issues'
),
path:
'issues_analytics#show'
,
link:
project_analytics_issues_analytics_path
(
project
),
link_to_options:
{
data:
{
priority:
priority
}
}
link:
project_analytics_issues_analytics_path
(
project
)
)
end
...
...
@@ -90,25 +89,24 @@ module EE
)
end
def
insights_navbar_link
(
project
,
current_user
,
priority
=
0
)
def
insights_navbar_link
(
project
,
current_user
)
return
unless
project_nav_tab?
(
:project_insights
)
navbar_sub_item
(
title:
_
(
'Insights'
),
path:
'insights#show'
,
link:
project_insights_path
(
project
),
link_to_options:
{
class:
'shortcuts-project-insights'
,
data:
{
qa_selector:
'project_insights_link'
,
priority:
priority
}
}
link_to_options:
{
class:
'shortcuts-project-insights'
,
data:
{
qa_selector:
'project_insights_link'
}
}
)
end
def
code_review_analytics_navbar_link
(
project
,
current_user
,
priority
=
0
)
def
code_review_analytics_navbar_link
(
project
,
current_user
)
return
unless
project_nav_tab?
(
:code_review
)
navbar_sub_item
(
title:
_
(
'Code Review'
),
path:
'projects/analytics/code_reviews#index'
,
link:
project_analytics_code_reviews_path
(
project
),
link_to_options:
{
data:
{
priority:
priority
}
}
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