Commit Graph

567 Commits

Author SHA1 Message Date
8dce3ece2b Open in browser: show menu item only if web port is published 2020-12-12 21:50:08 +02:00
dd92e85d45 Open in browser
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
2020-12-12 21:21:53 +02:00
b562c923b3 Merge pull request #242 from stokito/awesome
Add Alternatives section
2020-12-09 16:10:09 -05:00
ac76b2eac1 Add Alternatives section
This may help users to find more specific tool than ctop
2020-11-30 17:25:40 +02:00
b32f90fa4a Merge pull request #240 from stokito/name_width
#128 Set column Name to fixed width 30
2020-11-29 09:19:07 -05:00
bec78c90b5 Merge pull request #238 from stokito/leftovers
Use standard Go functions
2020-11-29 09:06:13 -05:00
043f4bd3f3 update dockerfile to go 1.15 2020-11-28 20:30:02 +00:00
c2401cb33a #128 Set column Name to fixed width 30 2020-11-27 23:12:16 +02:00
fa254c652c Columns settings: add hint for re-order columns 2020-11-27 22:34:55 +02:00
a59c7aab3c Fix: enable pause [p] only for running or paused container 2020-11-27 22:28:58 +02:00
4e44c9d5f7 file.go use filepath.Dir() 2020-11-26 12:08:55 +02:00
948e7cc9d0 docker_logs.go use SplitN(2) 2020-11-26 12:08:36 +02:00
6c662d91fb docker.go shortName() use TrimPrefix() 2020-11-25 19:17:07 +02:00
b4a63f8c60 docker_logs.go: use time.RFC3339Nano constant 2020-11-24 22:19:29 +02:00
87d135909f rename cpus column 2020-11-23 17:48:56 -05:00
117c3bc7b5 Merge pull request #234 from stokito/refresh
docker connector: refresh() delete container only if it not found but keep on failures
2020-11-22 19:00:31 -05:00
b1171f6c3e Merge pull request #235 from stokito/cpu_scale
#207 Replace scaleCpu option with dedicated column CPU Scaled
2020-11-21 12:19:43 -05:00
9a41252764 #207 CPU unscaled column changes color according to system total usage
If container uses two cores then CPU column will be always red even if we have dozens of other free cores and CPUS is 1%
2020-11-20 23:24:13 +02:00
f377dcaee2 #207 Replace scaleCpu option with dedicated column CPU Scaled
The new column is disabled by default.
2020-11-20 23:08:19 +02:00
65e9c6dff6 docker connector: refresh() delete container only if it not found but keep on failures
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
2020-11-20 19:44:09 +02:00
df0d8b7892 #187 "created" action is handled separately in watchEvents() 2020-11-20 19:26:02 +02:00
2792e72d18 Merge pull request #233 from stokito/exec_shell
Exec shell config
2020-11-20 11:22:59 -05:00
68d6da5c61 Merge pull request #231 from stokito/log_file
Log to file
2020-11-20 08:30:13 -05:00
53a6b36bf5 exec shell: detect default shell
Instead of using configured shell (e.g. bash) we can autodetect default container user's shell and execute it.
This is much safer because not all containers may have installed shell that is configured in ctop.
2020-11-20 10:42:52 +02:00
5ec02f760e exec shell: remove shell config or option
The option is never worked and can't properly work because almost all containers anyway using Ash/Dash from /bin/sh
2020-11-20 10:39:28 +02:00
83a422933a exec shell: on error show a status message instead of fatal exit 2020-11-20 10:33:44 +02:00
7679d4a7fd exec shell: fix shell config
Currently each time when ctop started it overwrites "shell" config with default value of program argument.
This means that in fact default shell config is never worked at all.
2020-11-20 10:31:00 +02:00
e34afceb5f logging: log to file
New env var CTOP_DEBUG_FILE to specify a path to log file
2020-11-19 20:11:46 +02:00
ddfff03c05 Merge pull request #229 from stokito/events
Improve docker events handling
2020-11-19 11:27:09 -05:00
29d90cfdd9 logging: start server after log is configured
Without this "logging server started" is written to stderr
2020-11-19 11:21:27 +02:00
ba126e6e7c events handling: early skipping of extremely frequent exec_* events
The exec_create, exec_start, exec_die and other events are generated by health checks
2020-11-18 23:04:29 +02:00
009201ed0c actionToStatus: catch more generic die instead of kill 2020-11-18 23:04:29 +02:00
2c07cab59c logging: skip timer events e.g. /timer/1s
Each second we receive the timer event which makes little sense but log is bloated with the event.
To make logs more readable we can disable logging of this event
2020-11-18 23:04:29 +02:00
fd06992236 Merge pull request #230 from stokito/skip_timer_logging
logging: skip timer events e.g. /timer/1s
2020-11-18 09:40:33 -05:00
e64edbdc36 logging: skip timer events e.g. /timer/1s
Each second we receive the timer event which makes little sense but log is bloated with the event.
To make logs more readable we can disable logging of this event
2020-11-18 11:25:20 +02:00
4c280cee56 Improve docker events handling: separate channel for status updates
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.
2020-11-17 22:00:03 +02:00
b65e970a83 Improve docker events handling
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.
2020-11-17 21:50:25 +02:00
957cabba2d docker.go: watchEvents() optimize actionName extraction
Split(e.Action, ":") creates and array but we can avoid this.
2020-11-17 12:06:34 +02:00
5aacdc3772 docker.go: logging of events
Add log.IsEnabledFor(logging.DEBUG) guard to avoid unnecessary memory allocations. Debug level is usually disabled.
Inline "destroy"
2020-11-17 11:42:45 +02:00
99d9aeec98 set running = false when mock,runc collectors stopped 2020-11-13 21:43:11 +00:00
44600fca45 Merge pull request #201 from vcmkrtchyan/master
Fix freeze when container is started/stopped multiple times
2020-11-13 16:42:16 -05:00
9aaba5dfca Merge pull request #223 from stokito/trim
file.go: remove duplicated trim
2020-11-13 15:40:01 -05:00
0bd8efe800 fix makefile release 2020-11-13 20:35:40 +00:00
3a29c94833 Use percent() function to calc CPU usage 2020-11-13 11:02:14 +02:00
a22d99fefb file.go: remove duplicated trim
The s var was already trimmed on line 67
2020-11-12 21:23:18 +02:00
c971d26d42 v0.7.5 v0.7.5 2020-11-06 16:59:24 +00:00
de380ff810 add arch section to readme 2020-11-06 16:56:17 +00:00
e7e2478468 Merge pull request #222 from azlux/master
Readme : fix link
2020-11-05 13:44:35 -05:00
42c80c2395 fix link 2020-11-05 19:24:50 +01:00
d22bbc3420 Merge pull request #221 from azlux/master
Add apt azlux's repository
2020-11-05 13:16:22 -05:00