mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 23:26:45 +08:00
Compare commits
10 Commits
text-col-s
...
v0.7.5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c971d26d42 | ||
|
|
de380ff810 | ||
|
|
e7e2478468 | ||
|
|
42c80c2395 | ||
|
|
d22bbc3420 | ||
|
|
bdfb98265d | ||
|
|
af1908fb27 | ||
|
|
73a976c6fe | ||
|
|
2bcfc365f7 | ||
|
|
ecc7bf4081 |
4
Makefile
4
Makefile
@@ -29,10 +29,8 @@ image:
|
||||
|
||||
release:
|
||||
mkdir release
|
||||
go get github.com/progrium/gh-release/...
|
||||
cp _build/* release
|
||||
cd release; sha256sum --quiet --check sha256sums.txt
|
||||
gh-release create bcicen/$(NAME) $(VERSION) \
|
||||
$(shell git rev-parse --abbrev-ref HEAD) $(VERSION)
|
||||
gh release create $(VERSION) -d -t $(VERSION) *
|
||||
|
||||
.PHONY: build
|
||||
|
||||
22
README.md
22
README.md
@@ -17,10 +17,24 @@ as well as a [single container view][single_view] for inspecting a specific cont
|
||||
|
||||
Fetch the [latest release](https://github.com/bcicen/ctop/releases) for your platform:
|
||||
|
||||
#### Linux
|
||||
#### Debian/Ubuntu
|
||||
|
||||
Maintained by a [third party](https://packages.azlux.fr/)
|
||||
```bash
|
||||
echo "deb http://packages.azlux.fr/debian/ buster main" | sudo tee /etc/apt/sources.list.d/azlux.list
|
||||
wget -qO - https://azlux.fr/repo.gpg.key | sudo apt-key add -
|
||||
sudo apt update
|
||||
sudo apt install docker-ctop
|
||||
```
|
||||
|
||||
#### Arch
|
||||
|
||||
`ctop` is available for Arch in the [AUR](https://aur.archlinux.org/packages/ctop-bin/)
|
||||
|
||||
#### Linux (Generic)
|
||||
|
||||
```bash
|
||||
sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.4/ctop-0.7.4-linux-amd64 -O /usr/local/bin/ctop
|
||||
sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.5/ctop-0.7.5-linux-amd64 -O /usr/local/bin/ctop
|
||||
sudo chmod +x /usr/local/bin/ctop
|
||||
```
|
||||
|
||||
@@ -31,7 +45,7 @@ brew install ctop
|
||||
```
|
||||
or
|
||||
```bash
|
||||
sudo curl -Lo /usr/local/bin/ctop https://github.com/bcicen/ctop/releases/download/v0.7.4/ctop-0.7.4-darwin-amd64
|
||||
sudo curl -Lo /usr/local/bin/ctop https://github.com/bcicen/ctop/releases/download/v0.7.5/ctop-0.7.5-darwin-amd64
|
||||
sudo chmod +x /usr/local/bin/ctop
|
||||
```
|
||||
|
||||
@@ -44,8 +58,6 @@ docker run --rm -ti \
|
||||
quay.io/vektorlab/ctop:latest
|
||||
```
|
||||
|
||||
`ctop` is also available for Arch in the [AUR](https://aur.archlinux.org/packages/ctop-bin/)
|
||||
|
||||
## Building
|
||||
|
||||
Build steps can be found [here][build].
|
||||
|
||||
@@ -34,7 +34,7 @@ func New(id string, collector collector.Collector, manager manager.Manager) *Con
|
||||
return &Container{
|
||||
Metrics: models.NewMetrics(),
|
||||
Id: id,
|
||||
Meta: models.NewMeta("id", id),
|
||||
Meta: models.NewMeta("id", id[:12]),
|
||||
Widgets: widgets,
|
||||
updater: widgets,
|
||||
collector: collector,
|
||||
|
||||
@@ -13,14 +13,13 @@ type Info struct {
|
||||
data map[string]string
|
||||
}
|
||||
|
||||
func NewInfo(id string) *Info {
|
||||
func NewInfo() *Info {
|
||||
p := ui.NewTable()
|
||||
p.Height = 4
|
||||
p.Width = colWidth[0]
|
||||
p.FgColor = ui.ThemeAttr("par.text.fg")
|
||||
p.Separator = false
|
||||
i := &Info{p, make(map[string]string)}
|
||||
i.Set("id", id)
|
||||
return i
|
||||
}
|
||||
|
||||
|
||||
@@ -23,12 +23,9 @@ type Single struct {
|
||||
Width int
|
||||
}
|
||||
|
||||
func NewSingle(id string) *Single {
|
||||
if len(id) > 12 {
|
||||
id = id[:12]
|
||||
}
|
||||
func NewSingle() *Single {
|
||||
return &Single{
|
||||
Info: NewInfo(id),
|
||||
Info: NewInfo(),
|
||||
Net: NewNet(),
|
||||
Cpu: NewCpu(),
|
||||
Mem: NewMem(),
|
||||
|
||||
Reference in New Issue
Block a user