Skip to content
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

Fix for custom button action events #8930

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

jeffibm
Copy link
Member

@jeffibm jeffibm commented Oct 6, 2023

Before
When we hit the custom buttons from the Service#show page, there was no action.
image

After
The custom button actions are now working and being redirected to another page...
image

@DavidResende0
Copy link
Member

@jeffibm do you have an example of a simple button that I could create to test? Mine say the've launched but I can't tell if they're actually executing correctly.

@@ -33,9 +33,20 @@ def button
service_retire
when 'service_retire_now'
service_retire_now
when "custom_button"
@display == 'generic_objects' ? generic_object_custom_buttons : custom_buttons
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we raise here in an else case with a generic "not supported" warning? I assume before this change, it didn't do anything when you clicked the button. What's the best way to handle a button with no defined action?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we raise here in an else case with a generic "not supported" warning? I assume before this change, it didn't do anything when you clicked the button. What's the best way to handle a button with no defined action?

I had added a default action.
image

Fix for custom button action events
@jeffibm jeffibm force-pushed the fix-custom-button-action branch from cfac16f to 4137588 Compare November 14, 2023 04:09
@miq-bot
Copy link
Member

miq-bot commented Nov 14, 2023

Checked commit jeffbonson@4137588 with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint
3 files checked, 0 offenses detected
Everything looks fine. 🍰

@jeffibm
Copy link
Member Author

jeffibm commented Nov 14, 2023

Hey @jrafanie , if this PR is good, can we merge it?

Copy link
Member

@jrafanie jrafanie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jrafanie jrafanie merged commit 41db630 into ManageIQ:master Nov 14, 2023
8 checks passed
@jrafanie jrafanie assigned jrafanie and unassigned Fryguy Nov 14, 2023
@jrafanie
Copy link
Member

@jeffibm can you add backport labels?

@Fryguy
Copy link
Member

Fryguy commented Nov 16, 2023

Backported to quinteros in commit bfb6556.

commit bfb6556836652851833aa258bc69d11835f17d4c
Author: Joe Rafaniello <jrafanie@users.noreply.github.com>
Date:   Tue Nov 14 08:58:35 2023 -0500

    Merge pull request #8930 from jeffibm/fix-custom-button-action
    
    Fix for custom button action events
    
    (cherry picked from commit 41db630b2453f6fb9be2aeb1df0c9c66dcb48eaf)

Fryguy pushed a commit that referenced this pull request Nov 16, 2023
Fix for custom button action events

(cherry picked from commit 41db630)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants