From 5d770c14a761fe77a1802ee829e17c648720d6b8 Mon Sep 17 00:00:00 2001 From: "sylor_huang@126.com" Date: Thu, 14 May 2020 18:13:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9sidekiq=E4=B8=BAadmins?= =?UTF-8?q?=E6=89=8D=E8=83=BD=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/admins/shared/_sidebar.html.erb | 2 +- config/routes.rb | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/views/admins/shared/_sidebar.html.erb b/app/views/admins/shared/_sidebar.html.erb index 7287c0347..de56a5477 100644 --- a/app/views/admins/shared/_sidebar.html.erb +++ b/app/views/admins/shared/_sidebar.html.erb @@ -41,7 +41,7 @@ <% end %>
  • - <%= sidebar_item('/sidekiq', '定时任务', icon: 'bell', controller: 'root') %> + <%= sidebar_item('/admins/sidekiq', '定时任务', icon: 'bell', controller: 'root') %>
  • <%= sidebar_item('/', '返回主站', icon: 'sign-out', controller: 'root') %>
  • diff --git a/config/routes.rb b/config/routes.rb index af21e3bb1..f0133696b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,8 +1,6 @@ Rails.application.routes.draw do - require 'sidekiq/web' - require 'admin_constraint' - mount Sidekiq::Web => '/sidekiq' + # mount Sidekiq::Web => '/sidekiq', :constraints => AdminConstraint.new @@ -383,6 +381,10 @@ Rails.application.routes.draw do end namespace :admins do + require 'sidekiq/web' + require 'admin_constraint' + mount Sidekiq::Web => '/sidekiq' + get '/', to: 'dashboards#index' resources :project_statistics, only: [:index] do collection do