ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [38/50] [abbrv] ambari git commit: AMBARI-13444. Add a constant poller for admin web (rzang)
Date Mon, 19 Oct 2015 13:54:24 GMT
AMBARI-13444. Add a constant poller for admin web (rzang)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c9085317
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c9085317
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c9085317

Branch: refs/heads/branch-dev-patch-upgrade
Commit: c9085317bd65c100741a5655c59188df329128cc
Parents: f6ff71b
Author: Richard Zang <rzang@apache.org>
Authored: Fri Oct 16 15:22:30 2015 -0700
Committer: Richard Zang <rzang@apache.org>
Committed: Fri Oct 16 15:22:30 2015 -0700

----------------------------------------------------------------------
 .../ui/admin-web/app/scripts/controllers/mainCtrl.js         | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c9085317/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js
index e16d1dc..2c9e1c9 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js
@@ -118,11 +118,19 @@ angular.module('ambariAdminConsole')
     $rootScope.userActivityTimeoutInterval = window.setInterval(checkActiveness, 1000);
   };
 
+  // Send noop requests every 10 seconds just to keep backend session alive
+  $scope.startNoopPolling = function() {
+    $rootScope.noopPollingInterval = setInterval(Cluster.getAmbariTimeout, 10000);
+  };
+
   if (!$rootScope.userActivityTimeoutInterval) {
     Cluster.getAmbariTimeout().then(function(timeout) {
       if (Number(timeout) > 0)
         $scope.startInactiveTimeoutMonitoring(timeout * 1000);
     });
   }
+  if (!$rootScope.noopPollingInterval) {
+    $scope.startNoopPolling();
+  }
   $scope.updateInstances();
 }]);


Mime
View raw message