BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
5b698082
Commit
5b698082
authored
Apr 05, 2017
by
Sean McGivern
Committed by
Rémy Coutable
Apr 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename user cohorts -> cohorts
parent
0d7645e1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
10 additions
and
10 deletions
+10
-10
dispatcher.js
app/assets/javascripts/dispatcher.js
+1
-1
cohorts_controller.rb
app/controllers/admin/cohorts_controller.rb
+3
-3
cohorts_service.rb
app/services/cohorts_service.rb
+1
-1
_cohorts_table.html.haml
app/views/admin/cohorts/_cohorts_table.html.haml
+0
-0
_usage_ping.html.haml
app/views/admin/cohorts/_usage_ping.html.haml
+0
-0
index.html.haml
app/views/admin/cohorts/index.html.haml
+0
-0
_head.html.haml
app/views/admin/dashboard/_head.html.haml
+3
-3
admin.rb
config/routes/admin.rb
+1
-1
cohorts_service_spec.rb
spec/services/cohorts_service_spec.rb
+1
-1
No files found.
app/assets/javascripts/dispatcher.js
View file @
5b698082
...
...
@@ -366,7 +366,7 @@ const ShortcutsBlob = require('./shortcuts_blob');
new
Admin
();
switch
(
path
[
1
])
{
case
'application_settings'
:
case
'
user_
cohorts'
:
case
'cohorts'
:
new
gl
.
ApplicationSettings
();
break
;
case
'groups'
:
...
...
app/controllers/admin/
user_
cohorts_controller.rb
→
app/controllers/admin/cohorts_controller.rb
View file @
5b698082
class
Admin
::
User
CohortsController
<
Admin
::
ApplicationController
class
Admin
::
CohortsController
<
Admin
::
ApplicationController
def
index
if
ApplicationSetting
.
current
.
usage_ping_enabled
@cohorts
=
Rails
.
cache
.
fetch
(
'
user_
cohorts'
,
expires_in:
1
.
day
)
do
User
CohortsService
.
new
.
execute
@cohorts
=
Rails
.
cache
.
fetch
(
'cohorts'
,
expires_in:
1
.
day
)
do
CohortsService
.
new
.
execute
end
end
end
...
...
app/services/
user_
cohorts_service.rb
→
app/services/cohorts_service.rb
View file @
5b698082
class
User
CohortsService
class
CohortsService
MONTHS_INCLUDED
=
12
# Get a hash that looks like:
...
...
app/views/admin/
user_
cohorts/_cohorts_table.html.haml
→
app/views/admin/cohorts/_cohorts_table.html.haml
View file @
5b698082
File moved
app/views/admin/
user_
cohorts/_usage_ping.html.haml
→
app/views/admin/cohorts/_usage_ping.html.haml
View file @
5b698082
File moved
app/views/admin/
user_
cohorts/index.html.haml
→
app/views/admin/cohorts/index.html.haml
View file @
5b698082
File moved
app/views/admin/dashboard/_head.html.haml
View file @
5b698082
...
...
@@ -27,7 +27,7 @@
=
link_to
admin_runners_path
,
title:
'Runners'
do
%span
Runners
=
nav_link
path:
'
user_
cohorts#index'
do
=
link_to
admin_
user_cohorts_path
,
title:
'User c
ohorts'
do
=
nav_link
path:
'cohorts#index'
do
=
link_to
admin_
cohorts_path
,
title:
'C
ohorts'
do
%span
User c
ohorts
C
ohorts
config/routes/admin.rb
View file @
5b698082
...
...
@@ -106,7 +106,7 @@ namespace :admin do
end
end
resources
:
user_
cohorts
,
only: :index
resources
:cohorts
,
only: :index
resources
:builds
,
only: :index
do
collection
do
...
...
spec/services/
user_
cohorts_service_spec.rb
→
spec/services/cohorts_service_spec.rb
View file @
5b698082
require
'spec_helper'
describe
User
CohortsService
do
describe
CohortsService
do
describe
'#execute'
do
def
month_start
(
months_ago
)
months_ago
.
months
.
ago
.
beginning_of_month
.
to_date
...
...
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