Add/Edit BMH - make BMC optional#5942
Conversation
rawagner
commented
Jul 10, 2020


There was a problem hiding this comment.
@jtomasek I moved this hook to shared and also simplified it a bit.
There was a problem hiding this comment.
FIY useEffect is async and storing value to ref wont trigger a component update. Which means for first render this hook returns undefined and second render (which have to be triggered by something else) will return the correct value.
There was a problem hiding this comment.
I think its usually fine. But there's no way to update the previous value (after all its called previous, not first). Once you try to add dependency array to be able to update the initial value the async nature of useEffect will cause issues.
540f68b to
53b8572
Compare
andybraren
left a comment
There was a problem hiding this comment.
Looks great!
Just to confirm the behavior:
- If the user clicks
Edit Hostin the host's action menu, is theEnable power managementcheckbox checked/unchecked based on whether the BareMetalHost contains BMC credentials (checked if there are credentials, unchecked if there aren't)? - If the user clicks
Add credentialsanywhere in #5830, is theEnable power managementcheckbox automatically checked so that the Username/Password fields are visible?
And while we're in here, maybe two minor wording tweaks (missing a's):
Expand the hardware inventory by registering a new Bare Metal Host.
Provide a unique name...
correct :)
fixed |
53b8572 to
e88c823
Compare
- option to disable/enable power mgmt - handle loading/error states
e88c823 to
9394753
Compare
andybraren
left a comment
There was a problem hiding this comment.
correct :)
I'm happy then 😄 LGTM!
fixed
🎉
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andybraren, jtomasek, rawagner 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. |
4 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |