ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [28/50] ambari git commit: AMBARI-20125 - DataNode Storage alert is duplicated (rzang)
Date Fri, 24 Feb 2017 14:19:35 GMT
AMBARI-20125 - DataNode Storage alert is duplicated (rzang)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f936bcfd
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f936bcfd
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f936bcfd

Branch: refs/heads/branch-feature-AMBARI-12556
Commit: f936bcfdb3cc6451bd1fa82e0d6e98f2aec285df
Parents: e9c9439
Author: Richard Zang <rzang@apache.org>
Authored: Wed Feb 22 18:20:53 2017 -0800
Committer: Richard Zang <rzang@apache.org>
Committed: Wed Feb 22 18:20:53 2017 -0800

----------------------------------------------------------------------
 ambari-web/app/controllers/main/service/info/summary.js | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f936bcfd/ambari-web/app/controllers/main/service/info/summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/summary.js b/ambari-web/app/controllers/main/service/info/summary.js
index 0ca9775..183d5df 100644
--- a/ambari-web/app/controllers/main/service/info/summary.js
+++ b/ambari-web/app/controllers/main/service/info/summary.js
@@ -392,17 +392,21 @@ App.MainServiceInfoSummaryController = Em.Controller.extend(App.WidgetSectionMix
             "isOK": [],
             "isUnknown": []
           };
-
+          var others = [];
           serviceDefinitions.forEach(function (definition) {
             definition.set('isCollapsed', true);
+            var pushed = false; // make sure each definition gets pushed only one time
             Object.keys(definitionTypes).forEach(function (type) {
-              if (definition.get(type)) {
+              if (!pushed && definition.get(type)) {
                 definitionTypes[type].push(definition);
-                serviceDefinitions = serviceDefinitions.without(definition);
+                pushed = true;
               }
             });
+            if (!pushed) {
+              others.push(definition);
+            }
           });
-          serviceDefinitions = definitionTypes.isCritical.concat(definitionTypes.isWarning,
definitionTypes.isOK, definitionTypes.isUnknown, serviceDefinitions);
+          serviceDefinitions = definitionTypes.isCritical.concat(definitionTypes.isWarning,
definitionTypes.isOK, definitionTypes.isUnknown, others);
 
           return serviceDefinitions;
         }.property('controller.content'),


Mime
View raw message