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
iv
gitlab-ce
Commits
4b02f4a2
Commit
4b02f4a2
authored
Dec 19, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
show production.log, show only active milestone for issue filter
parent
e9c6d4ad
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
2 deletions
+27
-2
app/helpers/issues_helper.rb
app/helpers/issues_helper.rb
+4
-0
app/views/admin/logs/show.html.haml
app/views/admin/logs/show.html.haml
+16
-0
app/views/issues/index.html.haml
app/views/issues/index.html.haml
+2
-2
lib/gitlab/logger.rb
lib/gitlab/logger.rb
+5
-0
No files found.
app/helpers/issues_helper.rb
View file @
4b02f4a2
...
...
@@ -36,4 +36,8 @@ module IssuesHelper
labels
=
labels
.
map
{
|
l
|
{
label:
l
.
name
,
value:
l
.
name
}
}
labels
.
to_json
end
def
issues_active_milestones
@project
.
milestones
.
active
.
order
(
"id desc"
).
all
end
end
app/views/admin/logs/show.html.haml
View file @
4b02f4a2
...
...
@@ -3,6 +3,8 @@
=
link_to
"githost.log"
,
"#githost"
,
'data-toggle'
=>
'tab'
%li
=
link_to
"application.log"
,
"#application"
,
'data-toggle'
=>
'tab'
%li
=
link_to
"production.log"
,
"#production"
,
'data-toggle'
=>
'tab'
%p
.light
To prevent perfomance issues admin logs output the last 2000 lines
.tab-content
...
...
@@ -34,3 +36,17 @@
-
Gitlab
::
AppLogger
.
read_latest
.
each
do
|
line
|
%li
%p
=
line
.tab-pane
#production
.file_holder
#README
.file_title
%i
.icon-file
production.log
.right
=
link_to
'#'
,
class:
'log-bottom'
do
%i
.icon-arrow-down
Scroll down
.file_content.logs
%ol
-
Gitlab
::
Logger
.
read_latest_for
(
'production.log'
).
each
do
|
line
|
%li
%p
=
line
app/views/issues/index.html.haml
View file @
4b02f4a2
...
...
@@ -27,7 +27,7 @@
.left
=
select_tag
(
'update[status]'
,
options_for_select
([
'open'
,
'closed'
]),
prompt:
"Status"
)
=
select_tag
(
'update[assignee_id]'
,
options_from_collection_for_select
(
@project
.
users
.
all
,
"id"
,
"name"
,
params
[
:assignee_id
]),
prompt:
"Assignee"
)
=
select_tag
(
'update[milestone_id]'
,
options_from_collection_for_select
(
@project
.
milestones
.
order
(
"id desc"
).
all
,
"id"
,
"title"
,
params
[
:milestone_id
]),
prompt:
"Milestone"
)
=
select_tag
(
'update[milestone_id]'
,
options_from_collection_for_select
(
issues_active_milestones
,
"id"
,
"title"
,
params
[
:milestone_id
]),
prompt:
"Milestone"
)
=
hidden_field_tag
'update[issues_ids]'
,
[]
=
hidden_field_tag
:f
,
params
[
:f
]
=
button_tag
"Save"
,
class:
"btn update_selected_issues"
...
...
@@ -51,7 +51,7 @@
=
form_tag
project_issues_path
(
@project
),
method: :get
,
class: :right
do
=
select_tag
(
:label_name
,
options_for_select
(
issue_tags
,
params
[
:label_name
]),
prompt:
"Labels"
)
=
select_tag
(
:assignee_id
,
options_from_collection_for_select
([
unassigned_filter
]
+
@project
.
users
.
all
,
"id"
,
"name"
,
params
[
:assignee_id
]),
prompt:
"Assignee"
)
=
select_tag
(
:milestone_id
,
options_from_collection_for_select
([
unassigned_filter
]
+
@project
.
milestones
.
order
(
"id desc"
).
all
,
"id"
,
"title"
,
params
[
:milestone_id
]),
prompt:
"Milestone"
)
=
select_tag
(
:milestone_id
,
options_from_collection_for_select
([
unassigned_filter
]
+
issues_active_milestones
,
"id"
,
"title"
,
params
[
:milestone_id
]),
prompt:
"Milestone"
)
=
hidden_field_tag
:f
,
params
[
:f
]
.clearfix
...
...
lib/gitlab/logger.rb
View file @
4b02f4a2
...
...
@@ -14,6 +14,11 @@ module Gitlab
logs
=
`tail -n 2000
#{
path
}
`
.
split
(
"
\n
"
)
end
def
self
.
read_latest_for
filename
path
=
Rails
.
root
.
join
(
"log"
,
filename
)
logs
=
`tail -n 2000
#{
path
}
`
.
split
(
"
\n
"
)
end
def
self
.
build
new
(
Rails
.
root
.
join
(
"log"
,
file_name
))
end
...
...
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