Bug 1420314

Summary: UI: Service catalog ordering - spinner disappearing too soon, not in sync with page load
Product: Red Hat CloudForms Management Engine Reporter: Jan Krocil <jkrocil>
Component: UI - OPSAssignee: Martin Hradil <mhradil>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Krocil <jkrocil>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.7.0CC: hkataria, jhardy, mpovolny, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.8.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1422651 (view as bug list) Environment:
Last Closed: 2017-06-12 16:11:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1422651    

Description Jan Krocil 2017-02-08 12:48:06 UTC
Description of problem:
SSIA

Version-Release number of selected component (if applicable):
5.7.1.0

How reproducible:
Always

Steps to Reproduce:
1. Add a service catalog
2. Order the catalog

Actual results:
When the "Submit" button is clicked (when ordering), the JS spinner shows up only for a short period of time - it disappears before the page load is initiated.

Expected results:
JS spinner disappearing should be in sync with page load after submitting the Service Order form.

Additional info:
/catalog/dialog_form_button_pressed/2?button=submit

Appliance to test this is available here; feel free to order the service present in the UI to see the issue: https://10.8.198.131/

I set the severity to medium because this issue is breaking our automation and seems like a trivial fix.

Comment 4 CFME Bot 2017-02-09 12:12:36 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/d78dad10a6e366c26a75de6d29c447f96c9b51f1

commit d78dad10a6e366c26a75de6d29c447f96c9b51f1
Author:     Martin Hradil <mhradil>
AuthorDate: Wed Feb 8 13:25:24 2017 +0000
Commit:     Martin Hradil <mhradil>
CommitDate: Wed Feb 8 13:25:24 2017 +0000

    x_dialog_buttons - call miqAjaxButton with complete:false
    
    ..to prevent the spinner from disappearing right before a redirect.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1420314

 app/views/layouts/_x_dialog_buttons.html.haml | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comment 8 CFME Bot 2017-03-04 19:23:03 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/31dd96a63ba7ef57c441a67a99f7341c4a9e366c

commit 31dd96a63ba7ef57c441a67a99f7341c4a9e366c
Author:     Martin Hradil <mhradil>
AuthorDate: Fri Feb 24 14:25:23 2017 +0000
Commit:     Martin Hradil <mhradil>
CommitDate: Tue Feb 28 17:26:53 2017 +0000

    DialogRunner - form_field_changed - don't disable spinner
    
    sending a form_field_changed request does not enable a spinner, but the response would always disable it, leading to a race when:
    
    * user fills out a field
    * user clicks save, causing a blur event and a click event
    * the click event enables a spinner, but waits for the blur event to complete before submitting the form
    * the blur event triggers form_field_changed
    * the blur response removes the spinner
    * the click event submits the form
    
    => spinner is off, but the form is still being processed
    
    Fixing to not disable spinner on form field changed.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1420314
    (comment #6)

 app/controllers/application_controller/dialog_runner.rb | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comment 10 Jan Krocil 2017-05-02 18:11:08 UTC
Verified fixed in 5.8.0.12-rc1.20170425180304_4f35996.