Bug 1440058

Summary: infinispinner on attempt to open Alarm/Status Change management events on Timelines page
Product: Red Hat CloudForms Management Engine Reporter: Ievgen Zapolskyi <izapolsk>
Component: UI - OPSAssignee: Martin Hradil <mhradil>
Status: CLOSED CURRENTRELEASE QA Contact: Ievgen Zapolskyi <izapolsk>
Severity: high Docs Contact:
Priority: high    
Version: 5.8.0CC: cpelland, hkataria, jhardy, mhradil, mpovolny, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ui:timeline
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1458896 (view as bug list) Environment:
Last Closed: 2018-03-06 14:47:40 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:
Bug Depends On:    
Bug Blocks: 1458896    
Attachments:
Description Flags
js exception on parsing events none

Description Ievgen Zapolskyi 2017-04-07 08:47:50 UTC
Created attachment 1269618 [details]
js exception on parsing events

Description of problem:
I added infra provider to cfme and left appliance for several days to collect events.
When I try to open Timelines with Alarm/Status Change management events, I get infinispinner.
I noticed this issue first time in ~ 5.8.0.3 but Timelines has been broken down since 5.8.0.4 up to 5.8.0.9. So, I managed to catch it again only now.    

Version-Release number of selected component (if applicable):
5.8.0.3, 5.8.0.9

How reproducible:
100%


Steps to Reproduce:
1. Add infra provider to appliance (I used vsphere6-nested) 
2. wait until provider collects events (event_streams table and exception from JS console will be attached)
3. choose Alarm/Status Change event category and click Apply

Actual results:
infinispinner

Expected results:
correct parsing of events

Comment 8 CFME Bot 2017-04-26 08:23:22 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/0db9cb383e660541910edd80a29bc9a789281c71

commit 0db9cb383e660541910edd80a29bc9a789281c71
Author:     Martin Hradil <mhradil>
AuthorDate: Wed Apr 19 13:05:05 2017 +0000
Commit:     Martin Hradil <mhradil>
CommitDate: Wed Apr 19 13:08:35 2017 +0000

    Escape timeline JSON properly
    
    when used with %script, the resulting json is html-escaped and broken
    
    using :javascript now, and moving the logic to a proper function
    
    also removed code using empty hash to provide a default value for a json string
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1440058

 app/assets/javascripts/miq_timeline.js                | 19 +++++++++++++++++++
 app/views/dashboard/_tl_detail.html.haml              |  2 +-
 app/views/layouts/_timeline.html.haml                 | 14 ++------------
 app/views/layouts/_tl_detail.html.haml                |  2 +-
 .../miq_capacity/_bottlenecks_tl_detail.html.haml     |  2 +-
 5 files changed, 24 insertions(+), 15 deletions(-)

Comment 14 Ievgen Zapolskyi 2017-10-17 13:53:34 UTC
verified in 5.9.0.2.20171010190026_0413a06