Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
35e21b34
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 搜索 >>
提交
35e21b34
编写于
4月 20, 2012
作者:
R
randx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Admin dashboard
上级
1d601616
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
76 addition
and
1 deletion
+76
-1
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+17
-0
app/controllers/admin/dashboard_controller.rb
app/controllers/admin/dashboard_controller.rb
+12
-0
app/views/admin/dashboard/index.html.haml
app/views/admin/dashboard/index.html.haml
+45
-0
app/views/layouts/admin.html.haml
app/views/layouts/admin.html.haml
+1
-0
config/routes.rb
config/routes.rb
+1
-1
未找到文件。
app/assets/stylesheets/common.scss
浏览文件 @
35e21b34
...
...
@@ -903,3 +903,20 @@ li.note {
.milestone
{
@extend
.wll
;
}
/**
* Admin area
*
*/
.admin_dash
{
.data
{
a
{
h1
{
line-height
:
48px
;
font-size
:
48px
;
padding
:
20px
;
text-align
:center
;
}
}
}
}
app/controllers/admin/dashboard_controller.rb
0 → 100644
浏览文件 @
35e21b34
class
Admin::DashboardController
<
ApplicationController
layout
"admin"
before_filter
:authenticate_user!
before_filter
:authenticate_admin!
def
index
@workers
=
Resque
.
workers
@pending_jobs
=
Resque
.
size
(
:post_receive
)
@projects
=
Project
.
order
(
"created_at DESC"
).
limit
(
10
)
@users
=
User
.
order
(
"created_at DESC"
).
limit
(
10
)
end
end
app/views/admin/dashboard/index.html.haml
0 → 100644
浏览文件 @
35e21b34
.admin_dash.row
.span4
.ui-box
%h5
Resque Workers
.data.padded
=
link_to
"/info/resque"
do
%h1
{
:class
=>
@workers
.
present?
?
"cgreen"
:
"cred"
}
=
@workers
.
count
%hr
%p
%strong
{
:class
=>
@pending_jobs
>
0
?
"cred"
:
"cgreen"
}
#{
@pending_jobs
}
post receive jobs waiting
.span4
.ui-box
%h5
Projects
.data.padded
=
link_to
admin_projects_path
do
%h1
=
Project
.
count
%hr
=
link_to
'New Project'
,
new_admin_project_path
,
:class
=>
"btn small"
.span4
.ui-box
%h5
Users
.data.padded
=
link_to
admin_users_path
do
%h1
=
User
.
count
%hr
=
link_to
'New User'
,
new_admin_user_path
,
:class
=>
"btn small"
.row
.span6
%h3
Latest projects
%hr
-
@projects
.
each
do
|
project
|
%h5
=
link_to
project
.
name
,
[
:admin
,
project
]
.span6
%h3
Latest users
%hr
-
@users
.
each
do
|
user
|
%h5
=
link_to
user
.
name
,
[
:admin
,
user
]
app/views/layouts/admin.html.haml
浏览文件 @
35e21b34
...
...
@@ -7,6 +7,7 @@
.container
%nav
.main_menu
=
render
"layouts/const_menu_links"
=
link_to
"Stats"
,
admin_root_path
,
:class
=>
controller
.
controller_name
==
"dashboard"
?
"current"
:
nil
=
link_to
"Projects"
,
admin_projects_path
,
:class
=>
controller
.
controller_name
==
"projects"
?
"current"
:
nil
=
link_to
"Users"
,
admin_users_path
,
:class
=>
controller
.
controller_name
==
"users"
?
"current"
:
nil
=
link_to
"Emails"
,
admin_emails_path
,
:class
=>
controller
.
controller_name
==
"mailer"
?
"current"
:
nil
...
...
config/routes.rb
浏览文件 @
35e21b34
...
...
@@ -29,7 +29,7 @@ Gitlab::Application.routes.draw do
get
'mailer/preview_note'
get
'mailer/preview_user_new'
get
'mailer/preview_issue_new'
root
:to
=>
"
users
#index"
root
:to
=>
"
dashboard
#index"
end
get
"errors/githost"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录