Prechádzať zdrojové kódy

AMBARI-1362. Alerts for the hosts with ZooKeeper Server grows on every poll. (jaimin)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1443730 13f79535-47bb-0310-9956-ffa450edef68
Jaimin Jetly 12 rokov pred
rodič
commit
3575011b16
2 zmenil súbory, kde vykonal 5 pridanie a 3 odobranie
  1. 2 0
      CHANGES.txt
  2. 3 3
      ambari-web/app/mappers/alerts_mapper.js

+ 2 - 0
CHANGES.txt

@@ -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 

+ 3 - 3
ambari-web/app/mappers/alerts_mapper.js

@@ -73,11 +73,11 @@ App.alertsMapper = App.QuickDataMapper.create({
     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.create({
         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) {