Refactor and restyle Admin#background_jobs page
This commit is contained in:
parent
9f31fbc983
commit
88519e9033
2 changed files with 48 additions and 35 deletions
|
@ -1,4 +1,5 @@
|
|||
class Admin::BackgroundJobsController < Admin::ApplicationController
|
||||
def show
|
||||
@sidekiq_processes = `ps -U #{Settings.gitlab.user} -o euser,pid,pcpu,pmem,stat,start,command | grep sidekiq | grep -v grep`
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
%h3.page-title Background Jobs
|
||||
%br
|
||||
%p.light GitLab use #{link_to "sidekiq", "http://sidekiq.org/"} library for async job processing
|
||||
|
||||
%hr
|
||||
|
||||
.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
|
||||
.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
|
||||
.ui-box
|
||||
%table.zebra-striped
|
||||
%table.table
|
||||
%thead
|
||||
%th USER
|
||||
%th
|
||||
|
@ -25,7 +27,7 @@
|
|||
%th
|
||||
%th COMMAND
|
||||
%th
|
||||
- sidekiq_processes.split("\n").each do |process|
|
||||
- @sidekiq_processes.split("\n").each do |process|
|
||||
- next unless process.match(/(sidekiq \d+\.\d+\.\d+.+$)/)
|
||||
- data = process.gsub!(/\s+/m, '|').strip.split('|')
|
||||
%tr
|
||||
|
@ -33,6 +35,16 @@
|
|||
%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.
|
||||
|
||||
.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"}
|
||||
|
|
Loading…
Reference in a new issue