修改sidekiq为admins才能看

This commit is contained in:
sylor_huang@126.com 2020-05-14 18:13:07 +08:00
parent ac2e3ae730
commit 5d770c14a7
2 changed files with 6 additions and 4 deletions

View File

@ -41,7 +41,7 @@
<% end %>
</li>
<li>
<%= sidebar_item('/sidekiq', '定时任务', icon: 'bell', controller: 'root') %>
<%= sidebar_item('/admins/sidekiq', '定时任务', icon: 'bell', controller: 'root') %>
</li>
<li><%= sidebar_item('/', '返回主站', icon: 'sign-out', controller: 'root') %></li>
</ul>

View File

@ -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