Author: yusaku
Date: Tue Feb 26 22:48:35 2013
New Revision: 1450503

URL: http://svn.apache.org/r1450503
Log:
AMBARI-1501. Nagios alerts do not update automatically. (yusaku)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    
incubator/ambari/trunk/ambari-web/app/controllers/global/cluster_controller.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1450503&r1=1450502&r2=1450503&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Tue Feb 26 22:48:35 2013
@@ -376,6 +376,8 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-1501. Nagios alerts do not update automatically. (yusaku)
+
  AMBARI-1503. Ajax call sometimes adds multiple question marks in the query
  causing bad requests. (yusaku)
 

Modified: 
incubator/ambari/trunk/ambari-web/app/controllers/global/cluster_controller.js
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/global/cluster_controller.js?rev=1450503&r1=1450502&r2=1450503&view=diff
==============================================================================
--- 
incubator/ambari/trunk/ambari-web/app/controllers/global/cluster_controller.js 
(original)
+++ 
incubator/ambari/trunk/ambari-web/app/controllers/global/cluster_controller.js 
Tue Feb 26 22:48:35 2013
@@ -186,9 +186,12 @@ App.ClusterController = Em.Controller.ex
    * property, which will trigger the alerts property.
    */
   loadAlerts:function () {
+    if(App.Alert.find().content.length > 0){
+      return false;
+    }
     var self=this;
     if(App.router.get('updateController.isUpdated')){
-      return;
+      return false;
     }
     var nagiosUrl = this.get('nagiosUrl');
     if (nagiosUrl) {
@@ -214,6 +217,7 @@ App.ClusterController = Em.Controller.ex
       this.updateLoadStatus('alerts');
       console.log("No Nagios URL provided.")
     }
+    return true;
   }.observes('nagiosUrl'),
 
   /**


Reply via email to