Skip to content

Commit

Permalink
Fixed JS error, bottlenecks timeline does not have group levels.
Browse files Browse the repository at this point in the history
  • Loading branch information
h-kataria committed Nov 9, 2018
1 parent 2b18c22 commit 5e578c6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/assets/javascripts/miq_timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,15 @@
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];
Expand Down

0 comments on commit 5e578c6

Please sign in to comment.