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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
35e21b34
Commit
35e21b34
authored
Apr 20, 2012
by
randx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Admin dashboard
parent
1d601616
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
76 additions
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
No files found.
app/assets/stylesheets/common.scss
View file @
35e21b34
...
@@ -903,3 +903,20 @@ li.note {
...
@@ -903,3 +903,20 @@ li.note {
.milestone
{
.milestone
{
@extend
.wll
;
@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
View file @
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
View file @
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
View file @
35e21b34
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
.container
.container
%nav
.main_menu
%nav
.main_menu
=
render
"layouts/const_menu_links"
=
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
"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
"Users"
,
admin_users_path
,
:class
=>
controller
.
controller_name
==
"users"
?
"current"
:
nil
=
link_to
"Emails"
,
admin_emails_path
,
:class
=>
controller
.
controller_name
==
"mailer"
?
"current"
:
nil
=
link_to
"Emails"
,
admin_emails_path
,
:class
=>
controller
.
controller_name
==
"mailer"
?
"current"
:
nil
...
...
config/routes.rb
View file @
35e21b34
...
@@ -29,7 +29,7 @@ Gitlab::Application.routes.draw do
...
@@ -29,7 +29,7 @@ Gitlab::Application.routes.draw do
get
'mailer/preview_note'
get
'mailer/preview_note'
get
'mailer/preview_user_new'
get
'mailer/preview_user_new'
get
'mailer/preview_issue_new'
get
'mailer/preview_issue_new'
root
:to
=>
"
users
#index"
root
:to
=>
"
dashboard
#index"
end
end
get
"errors/githost"
get
"errors/githost"
...
...
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