Commit c2982c9a3116f95036d74530f7c20c692cb983d7
1 parent
78698698
Exists in
master
and in
4 other branches
sidekiq.log in admin area. Improved admin dashboard
Showing
3 changed files
with
56 additions
and
5 deletions
Show diff stats
app/assets/stylesheets/common.scss
app/views/admin/dashboard/index.html.haml
@@ -25,17 +25,51 @@ | @@ -25,17 +25,51 @@ | ||
25 | = link_to 'New User', new_admin_user_path, class: "btn small" | 25 | = link_to 'New User', new_admin_user_path, class: "btn small" |
26 | 26 | ||
27 | .row | 27 | .row |
28 | - .span6 | ||
29 | - %h3 Latest projects | 28 | + .span4 |
29 | + %h4 Latest projects | ||
30 | %hr | 30 | %hr |
31 | - @projects.each do |project| | 31 | - @projects.each do |project| |
32 | %p | 32 | %p |
33 | = link_to project.name_with_namespace, [:admin, project] | 33 | = link_to project.name_with_namespace, [:admin, project] |
34 | - .span6 | ||
35 | - %h3 Latest users | 34 | + %span.light.right |
35 | + = time_ago_in_words project.created_at | ||
36 | + ago | ||
37 | + | ||
38 | + .span4 | ||
39 | + %h4 Latest users | ||
36 | %hr | 40 | %hr |
37 | - @users.each do |user| | 41 | - @users.each do |user| |
38 | %p | 42 | %p |
39 | = link_to [:admin, user] do | 43 | = link_to [:admin, user] do |
40 | = user.name | 44 | = user.name |
41 | - %small= user.email | 45 | + %span.light.right |
46 | + = time_ago_in_words user.created_at | ||
47 | + ago | ||
48 | + | ||
49 | + .span4 | ||
50 | + %h4 Stats | ||
51 | + %hr | ||
52 | + %p | ||
53 | + Issues | ||
54 | + %span.light.right | ||
55 | + = Issue.count | ||
56 | + %p | ||
57 | + Merge Requests | ||
58 | + %span.light.right | ||
59 | + = MergeRequest.count | ||
60 | + %p | ||
61 | + Notes | ||
62 | + %span.light.right | ||
63 | + = Note.count | ||
64 | + %p | ||
65 | + Snippets | ||
66 | + %span.light.right | ||
67 | + = Snippet.count | ||
68 | + %p | ||
69 | + SSH Keys | ||
70 | + %span.light.right | ||
71 | + = Key.count | ||
72 | + %p | ||
73 | + Milestones | ||
74 | + %span.light.right | ||
75 | + = Milestone.count |
app/views/admin/logs/show.html.haml
@@ -5,6 +5,8 @@ | @@ -5,6 +5,8 @@ | ||
5 | = link_to "application.log", "#application", 'data-toggle' => 'tab' | 5 | = link_to "application.log", "#application", 'data-toggle' => 'tab' |
6 | %li | 6 | %li |
7 | = link_to "production.log", "#production", 'data-toggle' => 'tab' | 7 | = link_to "production.log", "#production", 'data-toggle' => 'tab' |
8 | + %li | ||
9 | + = link_to "sidekiq.log", "#sidekiq", 'data-toggle' => 'tab' | ||
8 | 10 | ||
9 | %p.light To prevent perfomance issues admin logs output the last 2000 lines | 11 | %p.light To prevent perfomance issues admin logs output the last 2000 lines |
10 | .tab-content | 12 | .tab-content |
@@ -50,3 +52,17 @@ | @@ -50,3 +52,17 @@ | ||
50 | - Gitlab::Logger.read_latest_for('production.log').each do |line| | 52 | - Gitlab::Logger.read_latest_for('production.log').each do |line| |
51 | %li | 53 | %li |
52 | %p= line | 54 | %p= line |
55 | + .tab-pane#sidekiq | ||
56 | + .file_holder#README | ||
57 | + .file_title | ||
58 | + %i.icon-file | ||
59 | + sidekiq.log | ||
60 | + .right | ||
61 | + = link_to '#', class: 'log-bottom' do | ||
62 | + %i.icon-arrow-down | ||
63 | + Scroll down | ||
64 | + .file_content.logs | ||
65 | + %ol | ||
66 | + - Gitlab::Logger.read_latest_for('sidekiq.log').each do |line| | ||
67 | + %li | ||
68 | + %p= line |