Explorar el Código

AMBARI-1520. Alerts take around 20-30 seconds to show up everytime you refresh the dashboard. (srimanth via yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1451335 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako hace 12 años
padre
commit
bed3af1c7f
Se han modificado 2 ficheros con 16 adiciones y 0 borrados
  1. 3 0
      CHANGES.txt
  2. 13 0
      ambari-web/app/controllers/global/cluster_controller.js

+ 3 - 0
CHANGES.txt

@@ -387,6 +387,9 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-1520. Alerts take around 20-30 seconds to show up everytime you
+ refresh the dashboad. (srimanth via yusaku)
+
  AMBARI-1523. Ambari API: Resources doesn't always honor partial response fields restrictions. (tbeerbower)
 
  AMBARI-1519. Ambari Web goes back and forth between frozen and usable state

+ 13 - 0
ambari-web/app/controllers/global/cluster_controller.js

@@ -207,6 +207,19 @@ App.ClusterController = Em.Controller.extend({
     }
   },
 
+  /**
+   * Determination of Nagios presence is known only after App.Service is
+   * loaded from server. When that is done, no one tells alerts to load,
+   * due to which alerts are not loaded & shown till the next polling cycle.
+   * This method immediately loads alerts once Nagios presence is known.
+   */
+  isNagiosInstalledListener: function () {
+    var self = this;
+    self.loadAlerts(function () {
+      self.updateLoadStatus('alerts');
+    });
+  }.observes('isNagiosInstalled'),
+
   /**
    * Send request to server to load components updated statuses
    * @param callback Slave function, should be called to fire delayed update.