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
7b2ea3a1
Commit
7b2ea3a1
authored
Jul 12, 2019
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'group-analytics-frame' into 'master'
Group analytics frame See merge request gitlab-org/gitlab-ee!14173
parents
78f6feaa
20f656cc
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
182 additions
and
0 deletions
+182
-0
config/routes.rb
config/routes.rb
+13
-0
ee/app/controllers/analytics/application_controller.rb
ee/app/controllers/analytics/application_controller.rb
+5
-0
ee/app/controllers/analytics/cycle_analytics_controller.rb
ee/app/controllers/analytics/cycle_analytics_controller.rb
+4
-0
ee/app/controllers/analytics/productivity_analytics_controller.rb
...ontrollers/analytics/productivity_analytics_controller.rb
+4
-0
ee/app/views/analytics/cycle_analytics/show.html.haml
ee/app/views/analytics/cycle_analytics/show.html.haml
+1
-0
ee/app/views/analytics/productivity_analytics/show.html.haml
ee/app/views/analytics/productivity_analytics/show.html.haml
+1
-0
ee/app/views/layouts/analytics.html.haml
ee/app/views/layouts/analytics.html.haml
+6
-0
ee/app/views/layouts/nav/sidebar/_analytics.html.haml
ee/app/views/layouts/nav/sidebar/_analytics.html.haml
+33
-0
ee/changelogs/unreleased/group-analytics-frame.yml
ee/changelogs/unreleased/group-analytics-frame.yml
+5
-0
ee/config/routes/analytics.rb
ee/config/routes/analytics.rb
+8
-0
ee/spec/controllers/analytics/cycle_analytics_controller_spec.rb
.../controllers/analytics/cycle_analytics_controller_spec.rb
+19
-0
ee/spec/controllers/analytics/productivity_analytics_controller_spec.rb
...llers/analytics/productivity_analytics_controller_spec.rb
+19
-0
ee/spec/routing/analytics_routing_spec.rb
ee/spec/routing/analytics_routing_spec.rb
+30
-0
ee/spec/views/layouts/nav/sidebar/_analytics.html.haml_spec.rb
...ec/views/layouts/nav/sidebar/_analytics.html.haml_spec.rb
+31
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
config/routes.rb
View file @
7b2ea3a1
...
...
@@ -110,6 +110,12 @@ Rails.application.routes.draw do
draw
:jira_connect
end
Gitlab
.
ee
do
constraints
(
::
Constraints
::
FeatureConstrainer
.
new
(
:analytics
))
do
draw
:analytics
end
end
if
ENV
[
'GITLAB_CHAOS_SECRET'
]
||
Rails
.
env
.
development?
resource
:chaos
,
only:
[]
do
get
:leakmem
...
...
@@ -119,6 +125,13 @@ Rails.application.routes.draw do
get
:kill
end
end
if
ENV
[
'GITLAB_ENABLE_CHAOS_ENDPOINTS'
]
get
'/chaos/leakmem'
=>
'chaos#leakmem'
get
'/chaos/cpuspin'
=>
'chaos#cpuspin'
get
'/chaos/sleep'
=>
'chaos#sleep'
get
'/chaos/kill'
=>
'chaos#kill'
end
end
concern
:clusterable
do
...
...
ee/app/controllers/analytics/application_controller.rb
0 → 100644
View file @
7b2ea3a1
# frozen_string_literal: true
class
Analytics::ApplicationController
<
ApplicationController
layout
'analytics'
end
ee/app/controllers/analytics/cycle_analytics_controller.rb
0 → 100644
View file @
7b2ea3a1
# frozen_string_literal: true
class
Analytics::CycleAnalyticsController
<
Analytics
::
ApplicationController
end
ee/app/controllers/analytics/productivity_analytics_controller.rb
0 → 100644
View file @
7b2ea3a1
# frozen_string_literal: true
class
Analytics::ProductivityAnalyticsController
<
Analytics
::
ApplicationController
end
ee/app/views/analytics/cycle_analytics/show.html.haml
0 → 100644
View file @
7b2ea3a1
-
page_title
_
(
'Cycle Analytics'
)
ee/app/views/analytics/productivity_analytics/show.html.haml
0 → 100644
View file @
7b2ea3a1
-
page_title
_
(
'Productivity Analytics'
)
ee/app/views/layouts/analytics.html.haml
0 → 100644
View file @
7b2ea3a1
-
page_title
_
(
'Analytics'
)
-
header_title
_
(
'Analytics'
),
analytics_root_path
-
nav
'analytics'
-
@left_sidebar
=
true
=
render
template:
'layouts/application'
ee/app/views/layouts/nav/sidebar/_analytics.html.haml
0 → 100644
View file @
7b2ea3a1
.nav-sidebar
{
class:
(
"sidebar-collapsed-desktop"
if
collapsed_sidebar?
)
}
.nav-sidebar-inner-scroll
.context-header
=
link_to
analytics_root_path
,
title:
_
(
'Analytics'
)
do
.avatar-container.s40.settings-avatar
=
sprite_icon
(
'log'
,
size:
24
)
.sidebar-context-title
=
_
(
'Analytics'
)
%ul
.sidebar-top-level-items
=
nav_link
(
controller: :productivity_analytics
)
do
=
link_to
analytics_productivity_analytics_path
,
class:
'qa-sidebar-productivity-analytics'
do
.nav-icon-container
=
sprite_icon
(
'comment'
)
%span
.nav-item-name
=
_
(
'Productivity Analytics'
)
%ul
.sidebar-sub-level-items.is-fly-out-only
=
nav_link
(
controller: :productivity_analytics
,
html_options:
{
class:
"fly-out-top-item qa-sidebar-productivity-analytics-fly-out"
}
)
do
=
link_to
analytics_productivity_analytics_path
do
%strong
.fly-out-top-item-name
=
_
(
'Productivity Analytics'
)
=
nav_link
(
controller: :cycle_analytics
)
do
=
link_to
analytics_cycle_analytics_path
,
class:
'qa-sidebar-cycle-analytics'
do
.nav-icon-container
=
sprite_icon
(
'repeat'
)
%span
.nav-item-name
=
_
(
'Cycle Analytics'
)
%ul
.sidebar-sub-level-items.is-fly-out-only
=
nav_link
(
controller: :cycle_analytics
,
html_options:
{
class:
"fly-out-top-item qa-sidebar-cycle-analytics-fly-out"
}
)
do
=
link_to
analytics_cycle_analytics_path
do
%strong
.fly-out-top-item-name
=
_
(
'Cycle Analytics'
)
=
render
'shared/sidebar_toggle_button'
ee/changelogs/unreleased/group-analytics-frame.yml
0 → 100644
View file @
7b2ea3a1
---
title
:
Add instance level analytics
merge_request
:
14173
author
:
type
:
added
ee/config/routes/analytics.rb
0 → 100644
View file @
7b2ea3a1
# frozen_string_literal: true
namespace
:analytics
do
root
to:
redirect
(
'-/analytics/productivity_analytics'
)
resource
:productivity_analytics
,
only: :show
resource
:cycle_analytics
,
only: :show
end
ee/spec/controllers/analytics/cycle_analytics_controller_spec.rb
0 → 100644
View file @
7b2ea3a1
# frozen_string_literal: true
require
'spec_helper'
describe
Analytics
::
CycleAnalyticsController
do
let
(
:user
)
{
create
(
:user
)
}
before
do
sign_in
(
user
)
end
describe
'GET show'
do
it
'renders `show` template'
do
get
:show
expect
(
response
).
to
render_template
:show
end
end
end
ee/spec/controllers/analytics/productivity_analytics_controller_spec.rb
0 → 100644
View file @
7b2ea3a1
# frozen_string_literal: true
require
'spec_helper'
describe
Analytics
::
ProductivityAnalyticsController
do
let
(
:user
)
{
create
(
:user
)
}
before
do
sign_in
(
user
)
end
describe
'GET show'
do
it
'renders `show` template'
do
get
:show
expect
(
response
).
to
render_template
:show
end
end
end
ee/spec/routing/analytics_routing_spec.rb
0 → 100644
View file @
7b2ea3a1
# frozen_string_literal: true
require
'spec_helper'
describe
'Analytics'
do
include
RSpec
::
Rails
::
RequestExampleGroup
include
Warden
::
Test
::
Helpers
let
(
:user
)
{
create
(
:user
)
}
it
"redirects to productivity_analytics"
do
expect
(
get
(
'/-/analytics'
)).
to
redirect_to
(
'/-/analytics/productivity_analytics'
)
end
context
':analytics feature is disabled'
do
before
do
stub_feature_flags
(
analytics:
false
)
end
it
'redirects to sign_in if user is not authenticated'
do
expect
(
get
(
'/-/analytics'
)).
to
redirect_to
(
'/users/sign_in'
)
end
it
'returns 404 if user is authenticated'
do
login_as
(
user
)
expect
(
get
(
'/-/analytics'
)).
to
eq
(
404
)
end
end
end
ee/spec/views/layouts/nav/sidebar/_analytics.html.haml_spec.rb
0 → 100644
View file @
7b2ea3a1
# frozen_string_literal: true
require
'spec_helper'
describe
'layouts/nav/sidebar/_analytics'
do
it_behaves_like
'has nav sidebar'
context
'top-level items'
do
before
do
render
end
it
'has `Analytics` link'
do
expect
(
rendered
).
to
have_content
(
'Analytics'
)
expect
(
rendered
).
to
include
(
analytics_root_path
)
expect
(
rendered
).
to
match
(
/<use xlink:href=".+?icons-.+?#log">/
)
end
it
'has `Productivity Analytics` link'
do
expect
(
rendered
).
to
have_content
(
'Productivity Analytics'
)
expect
(
rendered
).
to
include
(
analytics_productivity_analytics_path
)
expect
(
rendered
).
to
match
(
/<use xlink:href=".+?icons-.+?#comment">/
)
end
it
'has `Cycle Analytics` link'
do
expect
(
rendered
).
to
have_content
(
'Cycle Analytics'
)
expect
(
rendered
).
to
include
(
analytics_cycle_analytics_path
)
expect
(
rendered
).
to
match
(
/<use xlink:href=".+?icons-.+?#repeat">/
)
end
end
end
locale/gitlab.pot
View file @
7b2ea3a1
...
...
@@ -10308,6 +10308,9 @@ msgstr ""
msgid "Proceed"
msgstr ""
msgid "Productivity Analytics"
msgstr ""
msgid "Profile"
msgstr ""
...
...
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