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
b07c02eb
Unverified
Commit
b07c02eb
authored
Nov 20, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more info to admin dashboard
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
e3a71857
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
72 additions
and
12 deletions
+72
-12
dashboard_controller.rb
app/controllers/admin/dashboard_controller.rb
+1
-0
application_helper.rb
app/helpers/application_helper.rb
+0
-8
icons_helper.rb
app/helpers/icons_helper.rb
+17
-0
index.html.haml
app/views/admin/dashboard/index.html.haml
+44
-0
shell.rb
lib/gitlab/backend/shell.rb
+9
-0
check.rake
lib/tasks/gitlab/check.rake
+1
-4
No files found.
app/controllers/admin/dashboard_controller.rb
View file @
b07c02eb
...
...
@@ -2,5 +2,6 @@ class Admin::DashboardController < Admin::ApplicationController
def
index
@projects
=
Project
.
order
(
"created_at DESC"
).
limit
(
10
)
@users
=
User
.
order
(
"created_at DESC"
).
limit
(
10
)
@groups
=
Group
.
order
(
"created_at DESC"
).
limit
(
10
)
end
end
app/helpers/application_helper.rb
View file @
b07c02eb
...
...
@@ -187,14 +187,6 @@ module ApplicationHelper
Gitlab
.
config
.
extra
end
def
public_icon
content_tag
:i
,
nil
,
class:
'icon-globe cblue'
end
def
private_icon
content_tag
:i
,
nil
,
class:
'icon-lock cgreen'
end
def
search_placeholder
if
@project
&&
@project
.
persisted?
"Search in this project"
...
...
app/helpers/icons_helper.rb
0 → 100644
View file @
b07c02eb
module
IconsHelper
def
boolean_to_icon
(
value
)
if
value
.
to_s
==
"true"
content_tag
:i
,
nil
,
class:
'icon-circle cgreen'
else
content_tag
:i
,
nil
,
class:
'icon-circle cgray'
end
end
def
public_icon
content_tag
:i
,
nil
,
class:
'icon-globe cblue'
end
def
private_icon
content_tag
:i
,
nil
,
class:
'icon-lock cgreen'
end
end
app/views/admin/dashboard/index.html.haml
View file @
b07c02eb
...
...
@@ -52,6 +52,19 @@
ago
.span4
%h4
Latest groups
%hr
-
@groups
.
each
do
|
group
|
%p
=
link_to
[
:admin
,
group
]
do
=
group
.
name
%span
.light.pull-right
=
time_ago_in_words
group
.
created_at
ago
%br
.row
.span4
%h4
Stats
%hr
%p
...
...
@@ -82,3 +95,34 @@
Milestones
%span
.light.pull-right
=
Milestone
.
count
.span4
%h4
Features
%hr
%p
Sign up
%span
.light.pull-right
=
boolean_to_icon
gitlab_config
.
signup_enabled
%p
LDAP
%span
.light.pull-right
=
boolean_to_icon
Gitlab
.
config
.
ldap
.
enabled
%p
Gravatar
%span
.light.pull-right
=
boolean_to_icon
Gitlab
.
config
.
gravatar
.
enabled
%p
OmniAuth
%span
.light.pull-right
=
boolean_to_icon
Gitlab
.
config
.
omniauth
.
enabled
.span4
%h4
Components
%hr
%p
GitLab
%span
.pull-right
=
Gitlab
::
VERSION
%p
GitLab Shell
%span
.pull-right
=
Gitlab
::
Shell
.
new
.
version
lib/gitlab/backend/shell.rb
View file @
b07c02eb
...
...
@@ -196,6 +196,15 @@ module Gitlab
Gitlab
.
config
.
gitlab_shell
.
ssh_path_prefix
+
"
#{
path
}
.git"
end
# Return GitLab shell version
def
version
gitlab_shell_version_file
=
"
#{
gitlab_shell_user_home
}
/gitlab-shell/VERSION"
if
File
.
readable?
(
gitlab_shell_version_file
)
File
.
read
(
gitlab_shell_version_file
)
end
end
protected
def
gitlab_shell_user_home
...
...
lib/tasks/gitlab/check.rake
View file @
b07c02eb
...
...
@@ -611,10 +611,7 @@ namespace :gitlab do
end
def
gitlab_shell_version
gitlab_shell_version_file
=
"
#{
gitlab_shell_user_home
}
/gitlab-shell/VERSION"
if
File
.
readable?
(
gitlab_shell_version_file
)
File
.
read
(
gitlab_shell_version_file
)
end
Gitlab
::
Shell
.
new
.
version
end
def
has_gitlab_shell3?
...
...
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