diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-10-23 11:11:54 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-10-23 11:11:54 +0400 |
commit | 88519e90331339aa67420390193aaf32f7682c90 (patch) | |
tree | a3dffce4dfe51089cdefead78c82d6141902b486 /app/views/admin/background_jobs | |
parent | 9f31fbc9831f4742618116fbc3c534fb4d3b7798 (diff) |
Refactor and restyle Admin#background_jobs page
Diffstat (limited to 'app/views/admin/background_jobs')
-rw-r--r-- | app/views/admin/background_jobs/show.html.haml | 82 |
1 files changed, 47 insertions, 35 deletions
diff --git a/app/views/admin/background_jobs/show.html.haml b/app/views/admin/background_jobs/show.html.haml index af39e6e7cd5..431a9cbcd36 100644 --- a/app/views/admin/background_jobs/show.html.haml +++ b/app/views/admin/background_jobs/show.html.haml @@ -1,38 +1,50 @@ %h3.page-title Background Jobs -%br +%p.light GitLab use #{link_to "sidekiq", "http://sidekiq.org/"} library for async job processing + +%hr + +.ui-box + .title Sidekiq running processes + .ui-box-body + - if @sidekiq_processes.empty? + %h4.cred + %i.icon-warning-sign + There are no running sidekiq processes. Please restart GitLab + - else + %table.table + %thead + %th USER + %th + %th PID + %th + %th CPU + %th + %th MEM + %th + %th STATE + %th + %th START + %th + %th COMMAND + %th + - @sidekiq_processes.split("\n").each do |process| + - next unless process.match(/(sidekiq \d+\.\d+\.\d+.+$)/) + - data = process.gsub!(/\s+/m, '|').strip.split('|') + %tr + - 6.times do + %td= data.shift + %td + %td= data.join(" ") + + .clearfix + %p + %i.icon-exclamation-sign + If '[25 of 25 busy]' is shown, restart GitLab with 'sudo service gitlab reload'. + %p + %i.icon-exclamation-sign + If more than one sidekiq process is listed, stop GitLab, kill the remaining sidekiq processes (sudo pkill -u #{Settings.gitlab.user} -f sidekiq) and restart GitLab. + + + .ui-box %iframe{src: sidekiq_path, width: '100%', height: 900, style: "border: none"} -%h4 Sidekiq running processes -- sidekiq_processes = `ps -U #{Settings.gitlab.user} -o euser,pid,pcpu,pmem,stat,start,command | grep sidekiq | grep -v grep` -- if sidekiq_processes.empty? - %b There are no running sidekiq processes - %b Please restart GitLab -- else - .ui-box - %table.zebra-striped - %thead - %th USER - %th - %th PID - %th - %th CPU - %th - %th MEM - %th - %th STATE - %th - %th START - %th - %th COMMAND - %th - - sidekiq_processes.split("\n").each do |process| - - next unless process.match(/(sidekiq \d+\.\d+\.\d+.+$)/) - - data = process.gsub!(/\s+/m, '|').strip.split('|') - %tr - - 6.times do - %td= data.shift - %td - %td= data.join(" ") - %b If '[25 of 25 busy]' is shown, restart GitLab with 'sudo service gitlab reload'. - %br - %b If more than one sidekiq process is listed, stop GitLab, kill the remaining sidekiq processes (sudo pkill -u #{Settings.gitlab.user} -f sidekiq) and restart GitLab. |