mirror of
https://github.com/bcicen/ctop.git
synced 2024-08-30 18:23:19 +00:00
text.go: to do not manually truncate id and name columns
This truncation is already handled by termui
This commit is contained in:
parent
c5038e2edd
commit
41c04fefa2
@ -19,10 +19,6 @@ func NewNameCol() CompactCol {
|
|||||||
|
|
||||||
func (w *NameCol) SetMeta(m models.Meta) {
|
func (w *NameCol) SetMeta(m models.Meta) {
|
||||||
w.Text = m.Get("name")
|
w.Text = m.Get("name")
|
||||||
// truncate container id
|
|
||||||
if len(w.Text) > 12 {
|
|
||||||
w.Text = w.Text[:12]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type CIDCol struct {
|
type CIDCol struct {
|
||||||
@ -35,9 +31,6 @@ func NewCIDCol() CompactCol {
|
|||||||
|
|
||||||
func (w *CIDCol) SetMeta(m models.Meta) {
|
func (w *CIDCol) SetMeta(m models.Meta) {
|
||||||
w.Text = m.Get("id")
|
w.Text = m.Get("id")
|
||||||
if len(w.Text) > 12 {
|
|
||||||
w.Text = w.Text[:12]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type NetCol struct {
|
type NetCol struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user