From a52936f36a867dbdf40f0f45fd23db95e149480f Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Date: Thu, 30 May 2013 09:46:28 +0300 Subject: [PATCH] Renames resque resource to background_jobs --- .../admin/background_jobs_controller.rb | 4 ++++ app/controllers/admin/dashboard_controller.rb | 3 --- app/controllers/admin/resque_controller.rb | 4 ---- .../{resque => background_jobs}/show.html.haml | 0 app/views/admin/dashboard/index.html.haml | 16 ++++++++-------- app/views/layouts/nav/_admin.html.haml | 4 ++-- config/routes.rb | 2 +- 7 files changed, 15 insertions(+), 18 deletions(-) create mode 100644 app/controllers/admin/background_jobs_controller.rb delete mode 100644 app/controllers/admin/resque_controller.rb rename app/views/admin/{resque => background_jobs}/show.html.haml (100%) diff --git a/app/controllers/admin/background_jobs_controller.rb b/app/controllers/admin/background_jobs_controller.rb new file mode 100644 index 00000000000..994e707965a --- /dev/null +++ b/app/controllers/admin/background_jobs_controller.rb @@ -0,0 +1,4 @@ +class Admin::BackgroundJobsController < Admin::ApplicationController + def show + end +end diff --git a/app/controllers/admin/dashboard_controller.rb b/app/controllers/admin/dashboard_controller.rb index 3c27b86180b..3c80b6503fa 100644 --- a/app/controllers/admin/dashboard_controller.rb +++ b/app/controllers/admin/dashboard_controller.rb @@ -2,8 +2,5 @@ class Admin::DashboardController < Admin::ApplicationController def index @projects = Project.order("created_at DESC").limit(10) @users = User.order("created_at DESC").limit(10) - - rescue Redis::InheritedError - @resque_accessible = false end end diff --git a/app/controllers/admin/resque_controller.rb b/app/controllers/admin/resque_controller.rb deleted file mode 100644 index 7d489ab4876..00000000000 --- a/app/controllers/admin/resque_controller.rb +++ /dev/null @@ -1,4 +0,0 @@ -class Admin::ResqueController < Admin::ApplicationController - def show - end -end diff --git a/app/views/admin/resque/show.html.haml b/app/views/admin/background_jobs/show.html.haml similarity index 100% rename from app/views/admin/resque/show.html.haml rename to app/views/admin/background_jobs/show.html.haml diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index 46a876294ce..d3c938bb8f2 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -7,14 +7,6 @@ %h1= Project.count %hr = link_to 'New Project', new_project_path, class: "btn btn-small" - .span4 - .ui-box - %h5.title Groups - .data.padded - = link_to admin_groups_path do - %h1= Group.count - %hr - = link_to 'New Group', new_admin_group_path, class: "btn btn-small" .span4 .ui-box %h5.title Users @@ -23,6 +15,14 @@ %h1= User.count %hr = link_to 'New User', new_admin_user_path, class: "btn btn-small" + .span4 + .ui-box + %h5.title Groups + .data.padded + = link_to admin_groups_path do + %h1= Group.count + %hr + = link_to 'New Group', new_admin_group_path, class: "btn btn-small" .row .span4 diff --git a/app/views/layouts/nav/_admin.html.haml b/app/views/layouts/nav/_admin.html.haml index ca77c26e23d..e9ca29ea3be 100644 --- a/app/views/layouts/nav/_admin.html.haml +++ b/app/views/layouts/nav/_admin.html.haml @@ -14,6 +14,6 @@ = link_to "Logs", admin_logs_path = nav_link(controller: :hooks) do = link_to "Hooks", admin_hooks_path - = nav_link(controller: :resque) do - = link_to "Background Jobs", admin_resque_path + = nav_link(controller: :background_jobs) do + = link_to "Background Jobs", admin_background_jobs_path diff --git a/config/routes.rb b/config/routes.rb index 0b0bd293da2..3609ac01891 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -83,7 +83,7 @@ Gitlab::Application.routes.draw do end resource :logs, only: [:show] - resource :resque, controller: 'resque', only: [:show] + resource :background_jobs, controller: 'background_jobs', only: [:show] resources :projects, constraints: { id: /[a-zA-Z.\/0-9_\-]+/ }, only: [:index, :show] do scope module: :projects, constraints: { id: /[a-zA-Z.\/0-9_\-]+/ } do -- GitLab