-
Notifications
You must be signed in to change notification settings - Fork 358
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
Added UI support to add/edit OVF Template type Catalog Item(s) #7370
Added UI support to add/edit OVF Template type Catalog Item(s) #7370
Conversation
@@ -242,7 +242,7 @@ def atomic_form_field_changed | |||
if params[:st_prov_type] || (params[:display] && @edit[:new][:st_prov_type].starts_with?("generic")) | |||
page.replace("form_div", :partial => "st_form") | |||
end | |||
if params[:display] || params[:template_id] || params[:manager_id] | |||
if params[:display] || params[:template_id] || params[:manager_id] || params[:ovf_template_id] |
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 complex if statement (used twice in this file) can be extracted out into a tiny method named so that a developer can better understand the intent. So, instead of
if params[:display] || params[:template_id] || params[:manager_id] || params[:ovf_template_id]
it would say something like
if automate_catalog_needed?
and that method would be defined as
def automate_catalog_needed?
params[:display] || params[:template_id] || params[:manager_id] || params[:ovf_template_id]
end
@@ -203,7 +203,7 @@ def atomic_form_field_changed | |||
|
|||
get_form_vars | |||
# Build Catalog Items tree unless @edit[:ae_tree_select] |
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.
is this comment still relevant?
a39bce7
to
f5c7a27
Compare
@skateman New fields added on this form were: Resource Pool, EmsFolder, Host, OVF Template, VM Name, Accept All EULA. |
The PR testing went well 👍 |
Code looks good, is it enough if I believe @lfu that it works? 😉 |
9811a85
to
35121a3
Compare
Testing went well. |
@h-kataria the rubocop issues seem valid, you probably copied the indentation from a different level. |
35121a3
to
5c85ff8
Compare
Tested again and LGTM 👍 |
@h-kataria if this is ready for a merge, can you please squash the commits? |
This is Ruby/AJAX form similar with some special parameters for OVF Template provisioning. ManageIQ/manageiq#19718
5c85ff8
to
69b153d
Compare
Checked commit h-kataria@69b153d with ruby 2.6.3, rubocop 0.69.0, haml-lint 0.28.0, and yamllint **
|
@h-kataria @skateman This should be ready to merge now that the backend PRs are merged |
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 is Ruby/AJAX form similar with some special parameters for OVF Template provisioning.
ManageIQ/manageiq#19718
Depends on ManageIQ/manageiq#20636
@lfu please review/test
//cc @gtanzillo