Skip to content
Snippets Groups Projects
Commit 4b02f4a2 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

show production.log, show only active milestone for issue filter

parent e9c6d4ad
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
@@ -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
Loading
Loading
@@ -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
Loading
Loading
@@ -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"
Loading
Loading
@@ -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
 
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment