Bug 1690572

Summary: The first time you click a squash button on policy simulation page it doesn't respond
Product: Red Hat CloudForms Management Engine Reporter: John Dupuy <jdupuy>
Component: UI - OPSAssignee: Brian McLaughlin <bmclaugh>
Status: CLOSED ERRATA QA Contact: John Dupuy <jdupuy>
Severity: low Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: low    
Version: 5.10.2CC: bmidwood, dmetzger, hkataria, lavenel, mpovolny, mshriver, obarenbo, simaishi
Target Milestone: GA   
Target Release: 5.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.11.0.4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-12 13:36:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Simulation Page none

Description John Dupuy 2019-03-19 17:59:32 UTC
Created attachment 1545759 [details]
Simulation Page

Description of problem:
When you click the squash button (i.e. the button with the "+" that appears on the policy simulation page), it doesn't register with the first click. You must click it twice to get it to hide the tree. 

Version-Release number of selected component (if applicable):
5.10.2 & 5.9.9.1

How reproducible:
100%

Steps to Reproduce:
1. Add an infra provider
2. Navigate to Control -> Simulation
3. Fill in the form (see screenshot for example)
4. Click "Submit"
5. Click the squash button (under "Policy Simulation Results", with the "+")

Actual results:
Nothing happens

Expected results:
The tree should be hidden on the first click

Additional info:
This button has two titles depending on whether or not the tree is expanded. After the policy simulation runs, the default is for the title to be "Expand All". However, since the tree is expanded by default, nothing happens when you click the button. 

The same is true of the squash button on the policy simulation page of a VM/instance.

Comment 4 CFME Bot 2019-05-09 20:46:40 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/47b7b6ada3e824ed92511fdceefc476a7ef2ac4d
commit 47b7b6ada3e824ed92511fdceefc476a7ef2ac4d
Author:     Brian McLaughlin <bmclaugh>
AuthorDate: Thu Apr 25 08:47:40 2019 -0400
Commit:     Brian McLaughlin <bmclaugh>
CommitDate: Thu Apr 25 08:47:40 2019 -0400

    Fix squash button on Policy Simulation tree
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1690572

 app/assets/javascripts/miq_explorer.js | 3 +
 app/controllers/miq_policy_controller/rsop.rb | 1 +
 app/controllers/vm_common.rb | 5 +-
 app/presenters/explorer_presenter.rb | 1 +
 app/views/miq_policy/_rsop_results.html.haml | 4 +-
 app/views/vm_common/_policies.html.haml | 4 +-
 spec/controllers/vm_common_spec.rb | 7 +
 7 files changed, 20 insertions(+), 5 deletions(-)

Comment 5 John Dupuy 2019-05-15 18:59:26 UTC
Verified in 5.11.0.4.20190514210444_0c91ee1

Steps of verification:
1. Add an infra provider
2. Navigate to Control -> Simulation
3. Fill in the form (see screenshot for example)
4. Click "Submit"
5. Click the squash button (under "Policy Simulation Results", with the "-")
6. Verified that it responds on the initial click, and hides all the policy simulation results.

Comment 7 errata-xmlrpc 2019-12-12 13:36:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:4199