From 3acadeab11c9444949ca0e7450f1efa86dd0b845 Mon Sep 17 00:00:00 2001 From: Harpreet Kataria Date: Fri, 9 Nov 2018 17:54:41 -0500 Subject: [PATCH] Fixed JS error, bottlenecks timeline does not have group levels. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1648450 --- app/assets/javascripts/miq_timeline.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/assets/javascripts/miq_timeline.js b/app/assets/javascripts/miq_timeline.js index a536e51b2ca..daab9dcdfd6 100644 --- a/app/assets/javascripts/miq_timeline.js +++ b/app/assets/javascripts/miq_timeline.js @@ -82,10 +82,17 @@ warning: '#E17B1C' }; + if (typeof eventData === 'undefined' || typeof eventData.events === 'undefined') { + return colors.detail; + } + if (eventData.hasOwnProperty('events')) { var severity = 'detail'; var eventList = eventData.events; for (var i = 0; i < eventList.length; i++) { + if (typeof eventList[0].data.group_level === 'undefined') { + return colors.detail; + } severity = selectSevereer(eventList[i].data.group_level.value, severity); } return colors[severity];