amir20 / dozzle

Realtime log viewer for docker containers.
https://dozzle.dev/
MIT License
5.7k stars 287 forks source link

auto-redirect to new container broken #3123

Closed FrancYescO closed 1 month ago

FrancYescO commented 1 month ago

🔍 Check for existing issues

How is Dozzle deployed?

Standalone Deployment

📦 Dozzle version

8.0.5

✅ Command used to run Dozzle

README

🐛 Describe the bug / provide steps to reproduce it

this seems was broken with https://github.com/amir20/dozzle/pull/3098, suggested a solution https://github.com/amir20/dozzle/issues/3077#issuecomment-2230917021 this will also touch this issue https://github.com/amir20/dozzle/issues/3036

recreate a container, you will not be redirected and will end up to a page saying "no container found" despite the option "auto-redirect to new container w/matching name"

💻 Environment

-

📸 If applicable, add screenshots to help explain your bug

No response

📜 If applicable, attach your Dozzle logs. You many need to enable debug mode. See https://dozzle.dev/guide/debugging.

No response

amir20 commented 1 month ago

recreate a container, you will not be redirected and will end up to a page saying "no container found" despite the option "auto-redirect to new container w/matching name"

Is the container removed too in this case? Can you tell me which commands are being run? eg. docker stop or docker rm

amir20 commented 1 month ago

Ah I see what you mean now. If the container is removed then the page disappears.

I was testing with docker run --rm --name FOO ....

I'll have to think about how to do it better. 🤔

amir20 commented 1 month ago

This is going to be tricky because the menu on the left is closely related container view.

FrancYescO commented 1 month ago

i think that if instead of triggering instantly the delete of the container when you get the message from eventstream show an alert message like "container deleted going to remove" and put a timeout a little bigger of the redirect one to new container one will be enought to get all working as it was

amir20 commented 1 month ago

I think I have a better idea. I just need to do a soft delete so the container is still there but the menu hides it.

amir20 commented 1 month ago

Should be fixed in master now. Give it a try.