Created attachment 1213420 [details] deployment.ear Description of problem: While loading Timelines for Middleware Provider, in cases of failure events, there is a JS Error in console, and page loads endless. Version-Release number of selected component (if applicable): 5.7.0.6-alpha3.20161019140041_ea8e259 Chrome Version 53.0.2785.116 (64-bit) FF 49.0 How reproducible: always when several failure events exists Steps to Reproduce: 1. Deploy EAR file several times, each time with different runtime namem but the WAR and JAR file inside EAR keep the same. Starting from second deployments it is not successful, as inner WAR and JAR files already exists. 2. Go to Middleware Provider -> Timelines page. 3. Select "Application" Category,do not check " Show Detailed Events ", press Apply. So it should show failure evens. But in fact page loads endless, JS error is shown in browsers console. "SyntaxError: JSON.parse: expected ',' or '}' after property value in object at line 1 column 736 of the JSON data" Full console log for FF and Chrome are attached. EAR file is attached.
There does seem to be an issue displaying deployment failure events in the timeline. Not sure what happened, it's been working for quite a while, perhaps due to the page redesign. I'll see if I can find the issue, it may require a UI expert.
The problem is the message text being supplied from the hawkular server, describing the deployment failre. This wasn't a problem in the past but perhaps given the new timeline widget there is some new restriction. The plain text causes a problem as does the text produced by sending it through CGI::escapeHTML. So, I'm not exactly sure what the issue is. Perhaps it's too long, I'm not sure. I'll keep looking but I'm pretty sure the issue is because of the new timeline widget.
The problem seems to be that the timeline can not handle a message with an embedded newline. I will verify further but in my test a message like 'line1 line2' is failing. If this is the case I will workaround the issue by terminating our event messages at the first newline, but this is likely an issue with the timeline.
Actually, there is a second issue. In addition to newlines, double-quotes also can not be ingested. So, the workaround will be to truncate after the first line, and replace double-quotes with single-quotes. I will create an issue against the timeline in case MIQ wants to protect against these issues in the widget itself.
Here is the PR for a fix in the hawkular provider itself. I will also follow up by creating general timeline issues. https://github.com/ManageIQ/manageiq/pull/12176
This is waiting for MIQ merge. I set to POST.
*** Bug 1411827 has been marked as a duplicate of this bug. ***
Verified on revision 5.8.0.0