Most containers expose some http port. We can open it in browser.
For simplicity we can just open first container's published port.
We'll determine the ip:port on container creation and store to meta "Web Port".
To open browser on any platform was added a new dependency github.com/pkg/browser which is very small
If inspect() call was failed due to connection problems then container will be removed anyway as like ot wasn't found.
This is probably almost never happens in real life but still some missed logic bug
Instead of calling a heavy inspect api call we can easily changing status just by knowing an action.
Let's do this in a separate channel decouple UI update from basic event loop.
Firstly check health updates because it will be a lot of them especially when a container is unstable.
Clearly handle create event to create a container even if it wasn't started.
Instead of die event handle more precise events like oom, kill and only then trigger refresh.
Lookup the state from a map.
Change color status logic.
Highlight health status for Name column:
- starting - yellow
- healthy - green
- unhealthy - magenta
reformat
Fixed misprint
Removed unused colors of state widget.
Moved changes to another branch
Removed unused colors of state widget.
Remove swarm changes from master
Remove swarm changes from master
Remove swarm changes from master