You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2018/04/16 10:45:37 UTC

[ambari] branch trunk updated: AMBARI-23563 Alerts Are Not Updated in the UI

This is an automated email from the ASF dual-hosted git repository.

atkach pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 54d0f68  AMBARI-23563 Alerts Are Not Updated in the UI
54d0f68 is described below

commit 54d0f68c053e8e5efd67721a79a2f47262e3e7b0
Author: Andrii Tkach <at...@apache.org>
AuthorDate: Thu Apr 12 17:50:54 2018 +0300

    AMBARI-23563 Alerts Are Not Updated in the UI
---
 ambari-web/app/mappers/socket/alert_summary_mapper.js       | 5 +++--
 ambari-web/test/mappers/socket/alert_summary_mapper_test.js | 6 ++++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/ambari-web/app/mappers/socket/alert_summary_mapper.js b/ambari-web/app/mappers/socket/alert_summary_mapper.js
index 704c156..8101dcc 100644
--- a/ambari-web/app/mappers/socket/alert_summary_mapper.js
+++ b/ambari-web/app/mappers/socket/alert_summary_mapper.js
@@ -26,8 +26,9 @@ App.alertSummaryMapper = App.QuickDataMapper.create({
     const data = {
       alerts_summary_grouped: []
     };
-    for (let name in event.summaries) {
-      data.alerts_summary_grouped.push(event.summaries[name]);
+    const definitions = event.summaries[App.get('clusterId')];
+    for (let name in definitions) {
+      data.alerts_summary_grouped.push(definitions[name]);
     }
     App.alertDefinitionSummaryMapper.map(data);
   }
diff --git a/ambari-web/test/mappers/socket/alert_summary_mapper_test.js b/ambari-web/test/mappers/socket/alert_summary_mapper_test.js
index 3c3f606..49ede3a 100644
--- a/ambari-web/test/mappers/socket/alert_summary_mapper_test.js
+++ b/ambari-web/test/mappers/socket/alert_summary_mapper_test.js
@@ -33,8 +33,10 @@ describe('App.alertSummaryMapper', function () {
     it('App.alertDefinitionSummaryMapper.map should be called', function() {
       const event = {
         summaries: {
-          d1: {
-            definition_name: 'd1'
+          "1": {
+            d1: {
+              definition_name: 'd1'
+            }
           }
         }
       };

-- 
To stop receiving notification emails like this one, please contact
atkach@apache.org.