-
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
Pass additional information to the API when ordering a service catalog #2885
Conversation
@syncrou Can you review as well please? |
API PR has been merged. I would fix the code climate issue but there's just going to be a longer chain added with this PR. My suggestion would be to maybe have each new model that gets added implement a class method called something like |
@eclarizio - This looks fine to me - except for the ugly argument list - which you just were talking about - I would like to see that solved - but it sounds like that is a change for another day. 👍 |
WIP-ing as I think I just found an issue. Testing and will un-WIP when I fix. |
can you please add tests? - thanks! |
https://bugzilla.redhat.com/show_bug.cgi?id=1518390 Resource action id, target id, and target type need to be passed in order to establish the context that some dynamic methods may use when going through automate.
This will need ManageIQ/manageiq-api#233 to be merged first to handle the new refresh parameters. (Well, it doesn't need to be merged first, but it won't work without it because passing the extra parameters to the API is what will establish the context) |
:finish_submit_endpoint => svc_catalog_provision_finish_submit_endpoint, | ||
:cancel_endpoint => "/catalog/explorer" | ||
} | ||
dialog_initialize(ra, options) |
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 means no @edit
.
The templates still look at @edit
and even @edit[:explorer]
.. is that intentional?
(at least when using the old product setting they do)
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.
You're right, it's only for using the old product setting. I'll update with your suggested change, thanks.
Code looks good 👍 With the default settings, everything works 👍 With
|
diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb
index a807e5559b..f196dd8234 100644
--- a/app/controllers/catalog_controller.rb
+++ b/app/controllers/catalog_controller.rb
@@ -547,7 +547,11 @@ class CatalogController < ApplicationController
ra, st, svc_catalog_provision_finish_submit_endpoint
)
- replace_right_cell(:action => "dialog_provision", :dialog_locals => options[:dialog_locals])
+ if Settings.product.old_dialog_user_ui
+ dialog_initialize(ra, options)
+ else
+ replace_right_cell(:action => "dialog_provision", :dialog_locals => options[:dialog_locals])
+ end
else
# if catalog item has no dialog and provision button was pressed from list view
add_flash(_("No Ordering Dialog is available"), :warning) lets me use both the old and the new version :). |
https://bugzilla.redhat.com/show_bug.cgi?id=1518390 As before, resource action id, target id, and target type need to be passed to the API in order to establish the context for dialog fields when they are refreshed via the /service_dialogs endpoint
Checked commits eclarizio/manageiq-ui-classic@d7c7f9c~...cad3a39 with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0 spec/services/dialog_local_service_spec.rb
|
Pass additional information to the API when ordering a service catalog (cherry picked from commit 6e2fb56) https://bugzilla.redhat.com/show_bug.cgi?id=1520678
Gaprindashvili backport details:
|
Resource action id, target id, and target type need to be passed in order to establish the context that some dynamic methods may use when going through automate. This corresponds with @jntullo's API PR here.
https://bugzilla.redhat.com/show_bug.cgi?id=1518390
@miq-bot add_label gaprindashvili/yes, bug, blocker
@miq-bot assign @h-kataria
@d-m-u, @jntullo Mind taking a look and making sure I didn't miss something obvious?