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
Kazuhiko Shiozaki
gitlab-ce
Commits
ff9a2e2a
Commit
ff9a2e2a
authored
Nov 29, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve admin logs
parent
eb1004f7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
8 deletions
+16
-8
app/assets/javascripts/admin.js.coffee
app/assets/javascripts/admin.js.coffee
+5
-0
app/views/admin/groups/_form.html.haml
app/views/admin/groups/_form.html.haml
+0
-7
app/views/admin/logs/show.html.haml
app/views/admin/logs/show.html.haml
+10
-0
lib/gitlab/logger.rb
lib/gitlab/logger.rb
+1
-1
No files found.
app/assets/javascripts/admin.js.coffee
View file @
ff9a2e2a
...
@@ -10,3 +10,8 @@ $ ->
...
@@ -10,3 +10,8 @@ $ ->
$
(
'.log-tabs a'
).
click
(
e
)
->
$
(
'.log-tabs a'
).
click
(
e
)
->
e
.
preventDefault
()
e
.
preventDefault
()
$
(
this
).
tab
(
'show'
)
$
(
this
).
tab
(
'show'
)
$
(
'.log-bottom'
).
click
(
e
)
->
e
.
preventDefault
()
visible_log
=
$
(
".file_content:visible"
)
visible_log
.
animate
({
scrollTop
:
visible_log
.
find
(
'ol'
).
height
()
},
"fast"
)
app/views/admin/groups/_form.html.haml
View file @
ff9a2e2a
...
@@ -7,13 +7,6 @@
...
@@ -7,13 +7,6 @@
Group name is
Group name is
.input
.input
=
f
.
text_field
:name
,
placeholder:
"Example Group"
,
class:
"xxlarge"
=
f
.
text_field
:name
,
placeholder:
"Example Group"
,
class:
"xxlarge"
.clearfix
=
f
.
label
:path
do
URL
.input
.input-prepend
%span
.add-on
=
web_app_url
+
'groups/'
=
f
.
text_field
:path
,
placeholder:
"example"
.form-actions
.form-actions
=
f
.
submit
'Save group'
,
class:
"btn save-btn"
=
f
.
submit
'Save group'
,
class:
"btn save-btn"
app/views/admin/logs/show.html.haml
View file @
ff9a2e2a
...
@@ -3,12 +3,18 @@
...
@@ -3,12 +3,18 @@
=
link_to
"githost.log"
,
"#githost"
,
'data-toggle'
=>
'tab'
=
link_to
"githost.log"
,
"#githost"
,
'data-toggle'
=>
'tab'
%li
%li
=
link_to
"application.log"
,
"#application"
,
'data-toggle'
=>
'tab'
=
link_to
"application.log"
,
"#application"
,
'data-toggle'
=>
'tab'
%p
.light
To prevent perfomance issues admin logs output the last 2000 lines
.tab-content
.tab-content
.tab-pane.active
#githost
.tab-pane.active
#githost
.file_holder
#README
.file_holder
#README
.file_title
.file_title
%i
.icon-file
%i
.icon-file
githost.log
githost.log
.right
=
link_to
'#'
,
class:
'log-bottom'
do
%i
.icon-arrow-down
Scroll down
.file_content.logs
.file_content.logs
%ol
%ol
-
Gitlab
::
GitLogger
.
read_latest
.
each
do
|
line
|
-
Gitlab
::
GitLogger
.
read_latest
.
each
do
|
line
|
...
@@ -19,6 +25,10 @@
...
@@ -19,6 +25,10 @@
.file_title
.file_title
%i
.icon-file
%i
.icon-file
application.log
application.log
.right
=
link_to
'#'
,
class:
'log-bottom'
do
%i
.icon-arrow-down
Scroll down
.file_content.logs
.file_content.logs
%ol
%ol
-
Gitlab
::
AppLogger
.
read_latest
.
each
do
|
line
|
-
Gitlab
::
AppLogger
.
read_latest
.
each
do
|
line
|
...
...
lib/gitlab/logger.rb
View file @
ff9a2e2a
...
@@ -11,7 +11,7 @@ module Gitlab
...
@@ -11,7 +11,7 @@ module Gitlab
def
self
.
read_latest
def
self
.
read_latest
path
=
Rails
.
root
.
join
(
"log"
,
file_name
)
path
=
Rails
.
root
.
join
(
"log"
,
file_name
)
self
.
build
unless
File
.
exist?
(
path
)
self
.
build
unless
File
.
exist?
(
path
)
logs
=
File
.
read
(
path
)
.
split
(
"
\n
"
)
logs
=
`tail -n 2000
#{
path
}
`
.
split
(
"
\n
"
)
end
end
def
self
.
build
def
self
.
build
...
...
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