Skip to content

Commit

Permalink
feat: added StartupProbes status (S) to the PROBES column in the cont…
Browse files Browse the repository at this point in the history
…ainer render (derailed#2920)

* feat: added StartupProbes status (S) to the PROBES column in the container render

Signed-off-by: ffais <[email protected]>

* fix: fix tests  in container render

Signed-off-by: ffais <[email protected]>

---------

Signed-off-by: ffais <[email protected]>
  • Loading branch information
ffais authored Oct 17, 2024
1 parent f139a57 commit be1ec87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/render/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (Container) Header(ns string) model1.Header {
model1.HeaderColumn{Name: "STATE"},
model1.HeaderColumn{Name: "INIT"},
model1.HeaderColumn{Name: "RESTARTS", Align: tview.AlignRight},
model1.HeaderColumn{Name: "PROBES(L:R)"},
model1.HeaderColumn{Name: "PROBES(L:R:S)"},
model1.HeaderColumn{Name: "CPU", Align: tview.AlignRight, MX: true},
model1.HeaderColumn{Name: "MEM", Align: tview.AlignRight, MX: true},
model1.HeaderColumn{Name: "CPU/R:L", Align: tview.AlignRight},
Expand Down Expand Up @@ -116,7 +116,7 @@ func (c Container) Render(o interface{}, name string, r *model1.Row) error {
state,
boolToStr(co.IsInit),
restarts,
probe(co.Container.LivenessProbe) + ":" + probe(co.Container.ReadinessProbe),
probe(co.Container.LivenessProbe) + ":" + probe(co.Container.ReadinessProbe) + ":" + probe(co.Container.StartupProbe),
toMc(cur.cpu),
toMi(cur.mem),
toMc(res.cpu) + ":" + toMc(res.lcpu),
Expand Down
2 changes: 1 addition & 1 deletion internal/render/container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestContainer(t *testing.T) {
"Running",
"false",
"0",
"off:off",
"off:off:off",
"10",
"20",
"20:20",
Expand Down

0 comments on commit be1ec87

Please sign in to comment.