ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rz...@apache.org
Subject ambari git commit: AMBARI-20125 - DataNode Storage alert is duplicated (rzang)
Date Thu, 23 Feb 2017 03:10:19 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 05481cf05 -> 602e0a3e2


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/602e0a3e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/602e0a3e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/602e0a3e

Branch: refs/heads/branch-2.5
Commit: 602e0a3e23a3a0cab0ac0dd27bda6374017b1d43
Parents: 05481cf
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 19:03:43 2017 -0800

----------------------------------------------------------------------
 .../app/controllers/main/service/info/summary.js      | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/602e0a3e/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 9f61058..b3d7b35 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)) {
-                definition.set('isCollapsed', true);
+              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