Compare commits

..

10 Commits

Author SHA1 Message Date
Bradley Cicenas
c971d26d42 v0.7.5 2020-11-06 16:59:24 +00:00
Bradley Cicenas
de380ff810 add arch section to readme 2020-11-06 16:56:17 +00:00
bradley
e7e2478468 Merge pull request #222 from azlux/master
Readme : fix link
2020-11-05 13:44:35 -05:00
azlux
42c80c2395 fix link 2020-11-05 19:24:50 +01:00
bradley
d22bbc3420 Merge pull request #221 from azlux/master
Add apt azlux's repository
2020-11-05 13:16:22 -05:00
azlux
bdfb98265d Add apt azlux's repository 2020-11-05 10:54:10 +01:00
Bradley Cicenas
af1908fb27 update make release to use ghub cli 2020-11-03 07:55:39 -05:00
bradley
73a976c6fe Merge pull request #220 from stokito/single_view_trunc_id
Single Container View: truncate ID
2020-11-03 07:55:00 -05:00
Sergey Ponomarev
2bcfc365f7 Single Container View: truncate ID
Truncation Id inside of NewSingle() doesn't work.
It even doesn't have any effect.
Instead truncate the ID inside of NewMeta() call
2020-11-03 14:11:58 +02:00
bradley
ecc7bf4081 Merge pull request #219 from bcicen/text-col-setter
add textcol setter, static CID column width
2020-10-31 10:53:42 -04:00
7 changed files with 24 additions and 18 deletions

View File

@@ -29,10 +29,8 @@ image:
release: release:
mkdir release mkdir release
go get github.com/progrium/gh-release/...
cp _build/* release cp _build/* release
cd release; sha256sum --quiet --check sha256sums.txt cd release; sha256sum --quiet --check sha256sums.txt
gh-release create bcicen/$(NAME) $(VERSION) \ gh release create $(VERSION) -d -t $(VERSION) *
$(shell git rev-parse --abbrev-ref HEAD) $(VERSION)
.PHONY: build .PHONY: build

View File

@@ -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: 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 ```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 sudo chmod +x /usr/local/bin/ctop
``` ```
@@ -31,7 +45,7 @@ brew install ctop
``` ```
or or
```bash ```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 sudo chmod +x /usr/local/bin/ctop
``` ```
@@ -44,8 +58,6 @@ docker run --rm -ti \
quay.io/vektorlab/ctop:latest quay.io/vektorlab/ctop:latest
``` ```
`ctop` is also available for Arch in the [AUR](https://aur.archlinux.org/packages/ctop-bin/)
## Building ## Building
Build steps can be found [here][build]. Build steps can be found [here][build].

View File

@@ -1 +1 @@
0.7.4 0.7.5

View File

@@ -34,7 +34,7 @@ func New(id string, collector collector.Collector, manager manager.Manager) *Con
return &Container{ return &Container{
Metrics: models.NewMetrics(), Metrics: models.NewMetrics(),
Id: id, Id: id,
Meta: models.NewMeta("id", id), Meta: models.NewMeta("id", id[:12]),
Widgets: widgets, Widgets: widgets,
updater: widgets, updater: widgets,
collector: collector, collector: collector,

View File

@@ -13,14 +13,13 @@ type Info struct {
data map[string]string data map[string]string
} }
func NewInfo(id string) *Info { func NewInfo() *Info {
p := ui.NewTable() p := ui.NewTable()
p.Height = 4 p.Height = 4
p.Width = colWidth[0] p.Width = colWidth[0]
p.FgColor = ui.ThemeAttr("par.text.fg") p.FgColor = ui.ThemeAttr("par.text.fg")
p.Separator = false p.Separator = false
i := &Info{p, make(map[string]string)} i := &Info{p, make(map[string]string)}
i.Set("id", id)
return i return i
} }

View File

@@ -23,12 +23,9 @@ type Single struct {
Width int Width int
} }
func NewSingle(id string) *Single { func NewSingle() *Single {
if len(id) > 12 {
id = id[:12]
}
return &Single{ return &Single{
Info: NewInfo(id), Info: NewInfo(),
Net: NewNet(), Net: NewNet(),
Cpu: NewCpu(), Cpu: NewCpu(),
Mem: NewMem(), Mem: NewMem(),

View File

@@ -83,7 +83,7 @@ func SingleView() MenuFn {
ui.DefaultEvtStream.ResetHandlers() ui.DefaultEvtStream.ResetHandlers()
defer ui.DefaultEvtStream.ResetHandlers() defer ui.DefaultEvtStream.ResetHandlers()
ex := single.NewSingle(c.Id) ex := single.NewSingle()
c.SetUpdater(ex) c.SetUpdater(ex)
ex.Align() ex.Align()