Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add color to hpa line when replicas >= maxpods #2333

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

arthurcgc
Copy link

This PR implements the feature described in this issue: #2279

@arthurcgc arthurcgc changed the title Colorize hpa line when replicas >= maxpods Add color to hpa line when replicas >= maxpods Dec 21, 2023
Copy link
Owner

@derailed derailed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arthurcgc Thank you for this update Arthur! Just a few picks...

return func(ns string, h Header, re RowEvent) tcell.Color {
c := DefaultColorer(ns, h, re)

maxPodsS := strings.TrimSpace(re.Row.Fields[h.IndexOf("MAXPODS", true)])
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should validate IndexOf returns a valid index ie within the Fields range.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @derailed, thanks for reviewing my PR. I'll make the changes!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @derailed , could you take another look? Can I mark it as resolved?

@derailed derailed added the enhancement New feature or request label Dec 26, 2023
@arthurcgc arthurcgc requested a review from derailed March 11, 2024 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants