Author: jaimin
Date: Thu Feb  7 21:14:03 2013
New Revision: 1443730

URL: http://svn.apache.org/r1443730
Log:
AMBARI-1362. Alerts for the hosts with ZooKeeper Server grows on every poll. 
(jaimin)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/mappers/alerts_mapper.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1443730&r1=1443729&r2=1443730&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Thu Feb  7 21:14:03 2013
@@ -260,6 +260,8 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-1362. Alerts for the hosts with ZooKeeper Server grows on every poll. 
(jaimin)
+
  AMBARI-1360. Mouse cursor hover behavior is strange on Job Browser. (jaimin) 
 
  AMBARI-1359. App Browser rows colours should alternate from dark grey to 
light 

Modified: incubator/ambari/trunk/ambari-web/app/mappers/alerts_mapper.js
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/mappers/alerts_mapper.js?rev=1443730&r1=1443729&r2=1443730&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/mappers/alerts_mapper.js (original)
+++ incubator/ambari/trunk/ambari-web/app/mappers/alerts_mapper.js Thu Feb  7 
21:14:03 2013
@@ -73,11 +73,11 @@ App.alertsMapper = App.QuickDataMapper.c
     var alertsList = App.Alert.find();
     var titleToAlertMap = {};
     alertsList.forEach(function(alert){
-      titleToAlertMap[alert.get('serviceType') + alert.get('title') + 
alert.get('message')] = alert;
+      titleToAlertMap[alert.get('serviceType') + alert.get('title') + 
alert.get('hostName')] = alert;
     });
     var newRecords = [];
     alerts.forEach(function(item){
-      var existAlert = titleToAlertMap[item.service_type + 
item.service_description + item.plugin_output];
+      var existAlert = titleToAlertMap[item.service_type + 
item.service_description + item.host_name];
       if (existAlert == null) {
         var applyConfig = jQuery.extend({}, this.config);
         if (item.current_state && item.last_hard_state && item.current_state 
!= item.last_hard_state) {
@@ -125,7 +125,7 @@ App.alertsMapper = App.QuickDataMapper.c
         existAlert.set('lastTimeCritical', item.last_time_critical);
         existAlert.set('lastCheck', item.last_check);
         existAlert.set('isFlapping', item.is_flapping);
-        delete titleToAlertMap[item.service_type + item.service_description + 
item.plugin_output];
+        delete titleToAlertMap[item.service_type + item.service_description + 
item.host_name];
       }
     }, this);
     for ( var e in titleToAlertMap) {


Reply via email to