Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
5b698082
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
5b698082
编写于
4月 05, 2017
作者:
S
Sean McGivern
提交者:
Rémy Coutable
4月 14, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename user cohorts -> cohorts
上级
0d7645e1
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
16 addition
and
7 deletion
+16
-7
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+1
-1
app/controllers/admin/cohorts_controller.rb
app/controllers/admin/cohorts_controller.rb
+9
-0
app/services/cohorts_service.rb
app/services/cohorts_service.rb
+1
-1
app/views/admin/cohorts/_cohorts_table.html.haml
app/views/admin/cohorts/_cohorts_table.html.haml
+0
-0
app/views/admin/cohorts/_usage_ping.html.haml
app/views/admin/cohorts/_usage_ping.html.haml
+0
-0
app/views/admin/cohorts/index.html.haml
app/views/admin/cohorts/index.html.haml
+0
-0
app/views/admin/dashboard/_head.html.haml
app/views/admin/dashboard/_head.html.haml
+3
-3
config/routes/admin.rb
config/routes/admin.rb
+1
-1
spec/services/cohorts_service_spec.rb
spec/services/cohorts_service_spec.rb
+1
-1
未找到文件。
app/assets/javascripts/dispatcher.js
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
5b698082
文件已移动
app/views/admin/
user_
cohorts/_usage_ping.html.haml
→
app/views/admin/cohorts/_usage_ping.html.haml
浏览文件 @
5b698082
文件已移动
app/views/admin/
user_
cohorts/index.html.haml
→
app/views/admin/cohorts/index.html.haml
浏览文件 @
5b698082
文件已移动
app/views/admin/dashboard/_head.html.haml
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录