parent
5a8dc2d4b3
commit
7ece543681
|
|
@ -375,6 +375,7 @@ var expectedConfig = `k9s:
|
|||
critical: 90
|
||||
warn: 70
|
||||
screenDumpDir: /tmp
|
||||
disablePodCounting: false
|
||||
`
|
||||
|
||||
var resetConfig = `k9s:
|
||||
|
|
@ -428,4 +429,5 @@ var resetConfig = `k9s:
|
|||
critical: 90
|
||||
warn: 70
|
||||
screenDumpDir: /tmp
|
||||
disablePodCounting: false
|
||||
`
|
||||
|
|
|
|||
|
|
@ -31,3 +31,4 @@ k9s:
|
|||
view:
|
||||
active: po
|
||||
screenDumpDir: /tmp
|
||||
disablePodCounting: false
|
||||
|
|
|
|||
|
|
@ -77,6 +77,10 @@ func (n Node) Render(o interface{}, ns string, r *Row) error {
|
|||
nodeRoles(&no, roles)
|
||||
sort.Sort(roles)
|
||||
|
||||
podCount := strconv.Itoa(oo.PodCount)
|
||||
if pc := oo.PodCount; pc == -1 {
|
||||
podCount = NAValue
|
||||
}
|
||||
r.ID = client.FQN("", na)
|
||||
r.Fields = Fields{
|
||||
no.Name,
|
||||
|
|
@ -86,7 +90,7 @@ func (n Node) Render(o interface{}, ns string, r *Row) error {
|
|||
no.Status.NodeInfo.KernelVersion,
|
||||
iIP,
|
||||
eIP,
|
||||
strconv.Itoa(oo.PodCount),
|
||||
podCount,
|
||||
toMc(c.cpu),
|
||||
toMi(c.mem),
|
||||
client.ToPercentageStr(c.cpu, a.cpu),
|
||||
|
|
|
|||
Loading…
Reference in New Issue