Correctly display the numbers in the Ready column of the pods view (#2137)

mine
Jayson Wang 2023-06-18 21:48:33 +08:00 committed by GitHub
parent 152ace0f37
commit 957f70f775
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,6 @@ import (
"strconv"
"strings"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/tcell/v2"
"github.com/derailed/tview"
v1 "k8s.io/api/core/v1"
@ -14,6 +13,8 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
mv1beta1 "k8s.io/metrics/pkg/apis/metrics/v1beta1"
"github.com/derailed/k9s/internal/client"
)
// Pod renders a K8s Pod to screen.
@ -106,7 +107,7 @@ func (p Pod) Render(o interface{}, ns string, row *Row) error {
po.Namespace,
po.ObjectMeta.Name,
"●",
strconv.Itoa(cr) + "/" + strconv.Itoa(len(ss)),
strconv.Itoa(cr) + "/" + strconv.Itoa(len(po.Spec.Containers)),
strconv.Itoa(rc),
phase,
toMc(c.cpu),