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

Fix Toggle Faults filtering #2509

Merged
merged 3 commits into from
Feb 3, 2024
Merged

Fix Toggle Faults filtering #2509

merged 3 commits into from
Feb 3, 2024

Conversation

eiachh
Copy link
Contributor

@eiachh eiachh commented Jan 28, 2024

(Closed the previous pull request by mistake sorry)
Added extra column "VALID" into workload render, so toast can filter based on it. 2453

Also changed the name of the functions:
status->readiness
diagnose-> status

Since the column with header "STATUS" was not using the status function.

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.

@eiachh Thanks for this update Adam!

@@ -187,6 +188,15 @@ func diagnose(gvr client.GVR, r metav1.TableRow, h []metav1.TableColumnDefinitio
return StatusOK
}

func validity(gvr client.GVR, r metav1.TableRow, h []metav1.TableColumnDefinition) string {
Copy link
Owner

Choose a reason for hiding this comment

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

This ends up calling status again. Perhaps best to call it once and pass in status here to determine validity?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed validity func to take status as string in the parameters.

internal/render/workload.go Show resolved Hide resolved
@eiachh
Copy link
Contributor Author

eiachh commented Jan 31, 2024

@derailed Thank you for the review, changed what you requested. Let me know if something else needs to be changed still.

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.

@eiachh Nice!! Thank you for the updates Adam!

@derailed derailed merged commit cd5522c into derailed:master Feb 3, 2024
3 checks passed
@derailed derailed mentioned this pull request Feb 7, 2024
placintaalexandru pushed a commit to placintaalexandru/k9s that referenced this pull request Apr 3, 2024
* Added valid column to workloads for toast filtering

* Removed redundant status func call, changed workload header order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants