You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by rz...@apache.org on 2017/02/23 02:29:24 UTC
ambari git commit: AMBARI-20125 - DataNode Storage alert is
duplicated (rzang)
Repository: ambari
Updated Branches:
refs/heads/trunk e9c943905 -> f936bcfdb
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/trunk
Commit: f936bcfdb3cc6451bd1fa82e0d6e98f2aec285df
Parents: e9c9439
Author: Richard Zang <rz...@apache.org>
Authored: Wed Feb 22 18:20:53 2017 -0800
Committer: Richard Zang <rz...@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'),