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
Add Cancel button to policy simulation page #5341
Add Cancel button to policy simulation page #5341
Conversation
bc3e9fc
to
f833448
Compare
@miq-bot add_label bug, hammer/yes |
abfdaf6
to
e5620bc
Compare
e5620bc
to
2834e6b
Compare
@skateman You can check the spec ;) Thank you! ❇️ |
2834e6b
to
b3e1f09
Compare
@hstastna your fix does the job, however, it adds a lot of complexity to the code. However, I noticed there's a toolbar on the policy simulation page. What do you think about adding a "back" button into the toolbar instead of this complex logic? Maybe UX won't like that much as it would be a little inconsistent with the other policy simulation screens that have a cancel button on the bottom of the screen. However, if we're here, I think the "back" button is more meaningful here than "cancel" as the policy simulation is a totally passive and noninvasive thing that doesn't do anything to the VMs, just displays some info. From this info-displaying page, you would rather go "back" than "cancel" the simulation when you're done. Maybe we should bring in other people to discuss this, but I think this could be globally on every policy simulation screen. What do you think? |
@skateman I just added https://github.com/ManageIQ/manageiq-ui-classic/pull/5341/files#diff-dcf973c55609c594de2b7f1c5471d434R84 condition and the next two lines, everything else remains the same there. But I agree with you that it adds more complexity. |
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.
Okay, I am good with this, but can't give you the seal of approval due to the introduced complexity. Someone else should also take a look.
Thank you, @skateman. Anyway, some another solution came to my mind: Maybe I could create a separate method for canceling policy sim and to call it in the haml => not mixing with the existing code in |
903253a
to
18ac2e9
Compare
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1659088 Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1686617 Add the button to the page for policy simulation of vms/instances which were displayed as a nested list.
18ac2e9
to
899d63a
Compare
899d63a
to
48a8dd5
Compare
@skateman And what do you think now about the solution and its complexity? Thanks in advance for any feedback :) |
Checked commits hstastna/manageiq-ui-classic@086bb64~...48a8dd5 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 **
|
@h-kataria @mzazrivec @himdel Could you, please, review the changes? Thanks! :) |
LGTM, I think my only issue is with the message itself: "Edit policy simulation was cancelled by the user" that sounds like you're editing and then saving a policy simulation definition of some kind, So... just "Policy simulation was cancelled by the user" maybe? |
But actually, a second issue .. testing on master (infra/vms), I can see a Cancel button already there, in Which matches one of the BZ comments saying that it is there sometimes. So... if that's the case, we don't need to add another button. We should just fix |
@himdel Cancel button was never displayed if we wanted policy sim on some VMs displayed as a nested list (=> non explorer). And |
Aah, sorry, missed that yours is a fix for the non-explorer version 👍 |
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1659088
https://bugzilla.redhat.com/show_bug.cgi?id=1686617
What:
Add the missing button to the page for policy simulation of VMs/Instances which were displayed as a nested list (displayed from Relationships table of for example selected infra/cloud provider).
Steps to reproduce: (one of possible scenarios)
=> no Cancel button, not able to cancel policy simulation!
Note:
Cancel button is present and not missing, if we access VMs/Instances directly, thru Compute > Infra > VMs or Compute > Clouds > Instances.
TODO:
Where I tested policy simulation and displaying Cancel button with this PR (and it works there):
Before:
After:
Displaying flash message for non explorer screens (not always):