[ https://issues.apache.org/jira/browse/AMBARI-20125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15879624#comment-15879624 ]
Richard Zang commented on AMBARI-20125: --------------------------------------- When we try to sort alert collection in the order of "critical, warning, ok, unknown, other", we made modification to original looping collection "serviceDefinitions" during the forEach loop. Also, alert definition with multiple alert instances distributed in different categories got pushed multiple times during the sort. This led to duplicated entries after processing. {code} var property = context.get('componentName') ? 'componentName' : 'serviceName'; var serviceDefinitions = this.get('controller.content').filterProperty(property, context.get(property)); // definitions should be sorted in order: critical, warning, ok, unknown, other var definitionTypes = { "isCritical": [], "isWarning": [], "isOK": [], "isUnknown": [] }; serviceDefinitions.forEach(function (definition) { Object.keys(definitionTypes).forEach(function (type) { if (definition.get(type)) { definition.set('isCollapsed', true); definitionTypes[type].push(definition); serviceDefinitions = serviceDefinitions.without(definition); } }); }); serviceDefinitions = definitionTypes.isCritical.concat(definitionTypes.isWarning, definitionTypes.isOK, definitionTypes.isUnknown, serviceDefinitions); return serviceDefinitions; {code} > DataNode Storage alert is duplicated > ------------------------------------ > > Key: AMBARI-20125 > URL: https://issues.apache.org/jira/browse/AMBARI-20125 > Project: Ambari > Issue Type: Bug > Components: ambari-web > Affects Versions: 2.5.0 > Reporter: Richard Zang > Assignee: Richard Zang > Priority: Critical > Fix For: 2.5.0 > > > In the HDFS alert popup, "DataNode Storage" item is duplicated. -- This message was sent by Atlassian JIRA (v6.3.15#6346)