mrjackwills / oxker

A simple tui to view & control docker containers
MIT License
725 stars 24 forks source link

[NEW FEATURE] restart should use a different colour #4

Open mrjackwills opened 2 years ago

mrjackwills commented 2 years ago

Is your feature request related to a problem? Please describe. When restarting a container, the columns are still coloured as green

Describe the solution you'd like A container in a restarting state should use a none green (as current), nor red/yellow color

omnisci3nce commented 2 years ago

Would you be open to someone (noob) contributing this? I'm new to Rust so I'm looking for some small issues to work on to get my feet wet and I just found your tool after searching for Docker TUIs and really liking it so far.

mrjackwills commented 2 years ago

Yeah absolutely happily accept any PRs, don't worry about being a noob, I still am one

omnisci3nce commented 2 years ago

Fantastic. I'll have a crack at it this weekend.

omnisci3nce commented 2 years ago

I will be setting up a server + bunch of Docker stuff at work in the next few weeks so this TUI will come in handy. Until now I've just been using the commands as-is.

omnisci3nce commented 2 years ago

@mrjackwills Do you have a reliable way of getting into the Restarting state in the TUI? When I use 'restart' on my current docker containers as well as the three you have listed in the README, I do not see the state change to Restarting but rather I see

"running" .. "loading spinner starts" ......................... "see SIGTERM in logs" .. UI stays "running" but maybe flashes a different state or text that I couldn't see

Or is implementing something which turns the UI into "Restarting..." until it goes down then comes back up part of the scope of this issue?

mrjackwills commented 2 years ago

I think you could try two things, not completely tested them though

1) Set the docker refresh rate, with the -d flag, to something shorter, like 50ms

2) Purposefully create a container that has errors in it, for example a redis container in which you supply a conf file, in which you have set an incorrect setting, meaning the container will never correctly start. I'm not sure which setting to change, all I know is I have done this accidentally in the past when trying to create a service.

omnisci3nce commented 2 years ago

Thanks, I'll give that a go.