-
Notifications
You must be signed in to change notification settings - Fork 356
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
Host Edit Form React Conversion #8608
Conversation
ff917c7
to
a70e6cc
Compare
1997385
to
719ebfa
Compare
276c5c0
to
9935982
Compare
setState((state) => ({ | ||
...state, | ||
...appendState, | ||
fields, |
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.
we can use fields: []
and avoid the const fields
434aa5b
to
791ca7b
Compare
791ca7b
to
5083da1
Compare
a59d8ff
to
d6d73c7
Compare
0364f7c
to
fcfe4d8
Compare
fcfe4d8
to
29b7759
Compare
@miq-bot add-reviewer @DavidResende0 cc @kbrock |
NOTE: some follow up PRs were created for the schema, they will be needed to be able to properly test against this PR and they should be merged before this PR Update: These PRs have all been merged 👌 |
|
||
const asyncValidate = (fields, fieldNames) => new Promise((resolve, reject) => { | ||
const url = initialValues.host_validate_against ? `/api/hosts/${initialValues.host_validate_against}` : `/api/hosts/${ids[0]}`; | ||
console.log(url); |
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.
Think you forgot this
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.
For the most part everything looks good, however I did stumble on this minor bug when reseting the form and then canceling, while editing multiple hosts.
Untitled.mov
ce34648
to
9b4fd16
Compare
Applied the fix @DavidResende0 |
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.
LGTM, although since this is a bigger pr I wouldn't mind a second set of eyes just in case I missed something.
@MelsHyrule , noticed a small change in new ui v/s old ui redirection on cancel event. Screen.Recording.2023-04-05.at.10.21.56.AM.mov |
app/views/host/_form.html.haml
Outdated
- if session[:host_items] | ||
- @embedded = true | ||
= render :partial => 'layouts/gtl' | ||
= react('HostEditForm', { :ids => (@host.id ? [@host.id] : session[:host_items]) }) |
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.
can avoid spaces before and after { }
= react('HostEditForm', {:ids => (@host.id ? [@host.id] : session[:host_items])})
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.
Applied the change
just saw David's comment, but could you please cross-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.
looks good to me..
9b4fd16
to
4145af3
Compare
4145af3
to
49f1e1b
Compare
Checked commit MelsHyrule@49f1e1b with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint app/views/host/_form.html.haml |
1 similar comment
Checked commit MelsHyrule@49f1e1b with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint app/views/host/_form.html.haml |
@DavidResende0 @jeffibm applied the changes, are we good to merge? |
I think you meant approved, but yeah I'll merge it now |
The Angular to React conversion for the Host Edit page. Part of #7603 and https://github.ibm.com/katamari/dev-issue-tracking/issues/42129#issuecomment-51911692
Will also remove IPMI fields ManageIQ/manageiq#21381
Related schema in providers
For reference
Verify Credentials Issue #6625
BEFORE
Single Host Selected
Multiple Hosts Selected
AFTER
Single Host Selected
Multiple Hosts Selected