Bug 1392048

Summary: strange behavior of "No events available for this timeline" alert often leading to infinispinner
Product: Red Hat CloudForms Management Engine Reporter: Ievgen Zapolskyi <izapolsk>
Component: UI - OPSAssignee: Harpreet Kataria <hkataria>
Status: CLOSED CURRENTRELEASE QA Contact: Ievgen Zapolskyi <izapolsk>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.7.0CC: cpelland, hkataria, jhardy, mpovolny, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly
Target Release: 5.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ui:timeline:ui:flash_msg
Fixed In Version: 5.8.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1395295 (view as bug list) Environment:
FF 45.0.2
Last Closed: 2017-06-12 16:14:16 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:
Bug Depends On:    
Bug Blocks: 1395295    

Description Ievgen Zapolskyi 2016-11-04 16:15:38 UTC
Description of problem:
Usually, this alert from summary doesn't appear when I use Timelines.
It appears only when I open Timelines second time if Timelines was left thru menu or Infrastructure Provider link abandoning changes. In this case the alert appear when the view is opened and after each attempt to display timelines with Policy Events. Often when I play with timelines after such alert I get infinispinner.


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

How reproducible:
100%

Steps to Reproduce:
make sure you don't have any policy events atm
1. Open Timelines for Infra Provider
2. Choose Policy Events and one/many/all categories
3. Click Apply
4. Click Infrastructure Providers link in the top left corner of the Timelines view
5. Click OK in "abandon changes" dialog
6. Open Timelines for Infra Provider again
7. Play with Timelines for Policy Events by changing categories, date position (centered/starting/ending) and then clicking Apply

Actual results:
"No events available for this timeline" alert appears in just opened view after step 6. The alert appears on each attempt to display timelines for policy events when policy events are absent. Usually, such alert in absent. Empty view with text "Select your desired settings and click the apply button to view timeline data." is displayed instead.
step 7 is often leads to infinispinner. I got it 5+ times during playing with Timelines.

Expected results:
1. Such steps shouldn't lead to infinispinner
2. The alert should either appear every time when user tries to display Timelines if such events are absent or the alert shouldn't be displayed at all

Additional info:

Comment 3 CFME Bot 2016-11-12 00:06:33 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/077dfaba3bb5c7315224e29603bd9fb4eedd61ef

commit 077dfaba3bb5c7315224e29603bd9fb4eedd61ef
Author:     Harpreet Kataria <hkataria>
AuthorDate: Fri Nov 11 10:30:27 2016 -0500
Commit:     Harpreet Kataria <hkataria>
CommitDate: Fri Nov 11 10:30:27 2016 -0500

    Rebuild timeline options when Apply button is pressed.
    
    Need to rebuild timeline options when reset button is pressed so that date is reset when switching between Managament Events/Policy Event timelines.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1392048

 .../application_controller/timelines.rb            |  9 ++-----
 .../application_controller/timelines_spec.rb       | 28 ++++++++++++++++++++++
 2 files changed, 30 insertions(+), 7 deletions(-)
 create mode 100644 spec/controllers/application_controller/timelines_spec.rb