Allow inspection of containers and all_containers variables
This commit is contained in:
@ -13,5 +13,13 @@ module Admin
|
|||||||
format.json { render(json: dashboard_data) }
|
format.json { render(json: dashboard_data) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def dump_docker
|
||||||
|
authorize(self)
|
||||||
|
respond_to do |format|
|
||||||
|
format.html { render(json: DockerContainerPool.dump_info) }
|
||||||
|
format.json { render(json: DockerContainerPool.dump_info) }
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
module Admin
|
module Admin
|
||||||
class DashboardPolicy < AdminOnlyPolicy
|
class DashboardPolicy < AdminOnlyPolicy
|
||||||
|
def dump_docker?
|
||||||
|
admin?
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -38,6 +38,7 @@ Rails.application.routes.draw do
|
|||||||
|
|
||||||
namespace :admin do
|
namespace :admin do
|
||||||
get 'dashboard', to: 'dashboard#show'
|
get 'dashboard', to: 'dashboard#show'
|
||||||
|
get 'dashboard/dump_docker', to: 'dashboard#dump_docker'
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/insights', to: 'flowr#insights'
|
get '/insights', to: 'flowr#insights'
|
||||||
|
Reference in New Issue
Block a user