-
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
[GAPRINDASHVILI] - Custom button thru relationships #4893
[GAPRINDASHVILI] - Custom button thru relationships #4893
Conversation
The code displays the custom buttons if the previous screen was a provider screen ('@record') and displayed item ('@ display') is from the list of classes supported by custom buttons ('APPLIES_TO_CLASS_BASE_MODELS') Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1635738 (cherry picked from commit 828a7de)
(cherry picked from commit f2dae08)
(cherry picked from commit 653223a)
'params[:id]' is providers id (cherry picked from commit c100b2a)
(cherry picked from commit d8c3cb2)
(cherry picked from commit e6a4069)
(cherry picked from commit c8d58a6)
(cherry picked from commit 1623721)
having an id in `record_id` was causing to not send miq_grid_checks along in params when custom button was pressed from a list thru relationships (cherry picked from commit d8c3cb2)
7c94f3b
to
3dc4077
Compare
@himdel removed
since we don't need to set send_checked in button hash for Gaprindashvili, so needed to set value of record_id to LIST in above lines using part of the check that i removed. Setting/using of send_checked key in button hash is only being used on master/hammer codebase |
@@ -255,7 +256,9 @@ def cb_enabled_value_for_nested | |||
def create_custom_button(input, model, record) | |||
button_id = input[:id] | |||
button_name = input[:name].to_s | |||
record_id = if cb_send_checked_list | |||
record_id = if cb_send_checked_list || |
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 you replace this change with what's been done in #4887 please?
(It should be equivalent, but no point in not doing the same thing as on master.)
@@ -273,7 +270,8 @@ def create_custom_button(input, model, record) | |||
:url_parms => "?id=#{record_id}&button_id=#{button_id}&cls=#{model}&pressed=custom_button&desc=#{button_name}" | |||
} | |||
button[:text] = button_name if input[:text_display] | |||
button[:onwhen] = '1+' if cb_enabled_for_nested | |||
button[:onwhen] = '1+' if cb_send_checked_list | |||
button[:send_checked] = true if record_id == 'LIST' |
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 line does nothing in gaprindashvili
. (The equivalent functionality happens when record_id == "LIST"
, based on the value of url_parms
.)
(No harm though.)
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.
Might want to drop the send_checked
line to prevent confusion,
but I'm good with this either way 👍
@h-kataria let me know if you want to drop the line or if I should merge this as is.. |
Response to ManageIQ#4775 (comment) corrects the login in master, and should make it possible to backport to gaprindashvili (cherry picked from commit a54bcc0)
d8dcc5a
to
0780f6d
Compare
Checked commits h-kataria/manageiq-ui-classic@2d06c24~...0780f6d with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 spec/controllers/ems_infra_controller_spec.rb
|
@himdel please review this is resolve conflict with a backport of #4775 , tested in Gaprindashvili.