-
Notifications
You must be signed in to change notification settings - Fork 667
Add host status column #1774
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 host status column #1774
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused. Why are we copying all this logic from utils/status-icon.tsx?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This patch depends on #1697 which among other things lets plugins re-use the StatusIconAndText functionality (I've tried to cover the motivation here #1697 (comment))
|
/hold |
|
I've updated this PR to not depend on #1697 and used existing StatusIconAndText component to unblock this PR and work that depends on it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clever, but is this really better than...?
if (status === HOST_STATUS_DISCOVERED) {
return <AddDiscoveredHostButton host={host} />;
}
if (HOST_PROGRESS_STATES.includes(status)) {
return <StatusIconAndText status={title} iconName="refresh" />;
}
// ...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No strong opinion, but I find the switch statement a bit more readable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RBAC check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice if this is sortable, but I don't think there's a way to add sortFunc from a plugin yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not new, but it would be better to add types to all of these helper functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, I'll create BaremetalHostKind for host in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could be inferred from the return value, but I'm not against declaring it explicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Declare types
|
/hold cancel |
* Introduces BaremetalHostStatus component which renders appropriate status component based on host status * Introduces utility functions to determine host status (optionally also from host's machine and node)
|
/approve |
|
@honza: changing LGTM is restricted to collaborators DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: honza, jtomasek, knowncitizen The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/test e2e-aws |
|
/test frontend |
from host's machine and node)
Depends on #1697