Add 'delete' action for funkos that removes all trace

This commit is contained in:
2024-07-05 16:36:02 -03:00
parent cd868b1c86
commit 1b2bddf2d2
6 changed files with 48 additions and 12 deletions

View File

@ -126,6 +126,16 @@ module Funko
funko.wait_for(1, 1)
end
# Delete => scale to 0, remove all containers and images
delete "/funkos/:name/" do |env|
name = env.params.url["name"]
funko = Funko.from_names([name])[0]
funko.scale(0)
funko.wait_for(0, 1)
funko.remove_all_containers
funko.remove_all_images
end
# Return an iframe that shows the container's logs
get "/funkos/terminal/logs/:instance/" do |env|
instance = env.params.url["instance"]