Commit a52936f36a867dbdf40f0f45fd23db95e149480f

Authored by Dmitriy Zaporozhets
1 parent 84e4cfc6

Renames resque resource to background_jobs

app/controllers/admin/background_jobs_controller.rb 0 → 100644
@@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
  1 +class Admin::BackgroundJobsController < Admin::ApplicationController
  2 + def show
  3 + end
  4 +end
app/controllers/admin/dashboard_controller.rb
@@ -2,8 +2,5 @@ class Admin::DashboardController &lt; Admin::ApplicationController @@ -2,8 +2,5 @@ class Admin::DashboardController &lt; Admin::ApplicationController
2 def index 2 def index
3 @projects = Project.order("created_at DESC").limit(10) 3 @projects = Project.order("created_at DESC").limit(10)
4 @users = User.order("created_at DESC").limit(10) 4 @users = User.order("created_at DESC").limit(10)
5 -  
6 - rescue Redis::InheritedError  
7 - @resque_accessible = false  
8 end 5 end
9 end 6 end
app/controllers/admin/resque_controller.rb
@@ -1,4 +0,0 @@ @@ -1,4 +0,0 @@
1 -class Admin::ResqueController < Admin::ApplicationController  
2 - def show  
3 - end  
4 -end  
app/views/admin/background_jobs/show.html.haml 0 → 100644
@@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
  1 +%h3.page_title Background Jobs
  2 +%br
  3 +.ui-box
  4 + %iframe{src: sidekiq_path, width: '100%', height: 900, style: "border: none"}
app/views/admin/dashboard/index.html.haml
@@ -9,20 +9,20 @@ @@ -9,20 +9,20 @@
9 = link_to 'New Project', new_project_path, class: "btn btn-small" 9 = link_to 'New Project', new_project_path, class: "btn btn-small"
10 .span4 10 .span4
11 .ui-box 11 .ui-box
12 - %h5.title Groups  
13 - .data.padded  
14 - = link_to admin_groups_path do  
15 - %h1= Group.count  
16 - %hr  
17 - = link_to 'New Group', new_admin_group_path, class: "btn btn-small"  
18 - .span4  
19 - .ui-box  
20 %h5.title Users 12 %h5.title Users
21 .data.padded 13 .data.padded
22 = link_to admin_users_path do 14 = link_to admin_users_path do
23 %h1= User.count 15 %h1= User.count
24 %hr 16 %hr
25 = link_to 'New User', new_admin_user_path, class: "btn btn-small" 17 = link_to 'New User', new_admin_user_path, class: "btn btn-small"
  18 + .span4
  19 + .ui-box
  20 + %h5.title Groups
  21 + .data.padded
  22 + = link_to admin_groups_path do
  23 + %h1= Group.count
  24 + %hr
  25 + = link_to 'New Group', new_admin_group_path, class: "btn btn-small"
26 26
27 .row 27 .row
28 .span4 28 .span4
app/views/admin/resque/show.html.haml
@@ -1,4 +0,0 @@ @@ -1,4 +0,0 @@
1 -%h3.page_title Background Jobs  
2 -%br  
3 -.ui-box  
4 - %iframe{src: sidekiq_path, width: '100%', height: 900, style: "border: none"}  
app/views/layouts/nav/_admin.html.haml
@@ -14,6 +14,6 @@ @@ -14,6 +14,6 @@
14 = link_to "Logs", admin_logs_path 14 = link_to "Logs", admin_logs_path
15 = nav_link(controller: :hooks) do 15 = nav_link(controller: :hooks) do
16 = link_to "Hooks", admin_hooks_path 16 = link_to "Hooks", admin_hooks_path
17 - = nav_link(controller: :resque) do  
18 - = link_to "Background Jobs", admin_resque_path 17 + = nav_link(controller: :background_jobs) do
  18 + = link_to "Background Jobs", admin_background_jobs_path
19 19
config/routes.rb
@@ -83,7 +83,7 @@ Gitlab::Application.routes.draw do @@ -83,7 +83,7 @@ Gitlab::Application.routes.draw do
83 end 83 end
84 84
85 resource :logs, only: [:show] 85 resource :logs, only: [:show]
86 - resource :resque, controller: 'resque', only: [:show] 86 + resource :background_jobs, controller: 'background_jobs', only: [:show]
87 87
88 resources :projects, constraints: { id: /[a-zA-Z.\/0-9_\-]+/ }, only: [:index, :show] do 88 resources :projects, constraints: { id: /[a-zA-Z.\/0-9_\-]+/ }, only: [:index, :show] do
89 scope module: :projects, constraints: { id: /[a-zA-Z.\/0-9_\-]+/ } do 89 scope module: :projects, constraints: { id: /[a-zA-Z.\/0-9_\-]+/ } do