You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by xi...@apache.org on 2015/12/02 00:08:06 UTC

ambari git commit: AMBARI-14145. Autologout counts down till -1.(xiwang)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 304fe86b0 -> 936c79e5f


AMBARI-14145. Autologout counts down till -1.(xiwang)


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

Branch: refs/heads/branch-2.1
Commit: 936c79e5f96699ee668440dd27f4ac370c92afa0
Parents: 304fe86
Author: Xi Wang <xi...@apache.org>
Authored: Tue Dec 1 12:37:56 2015 -0800
Committer: Xi Wang <xi...@apache.org>
Committed: Tue Dec 1 15:07:29 2015 -0800

----------------------------------------------------------------------
 ambari-web/app/controllers/main.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/936c79e5/ambari-web/app/controllers/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main.js b/ambari-web/app/controllers/main.js
index c038cbe..48e9b81 100644
--- a/ambari-web/app/controllers/main.js
+++ b/ambari-web/app/controllers/main.js
@@ -250,7 +250,9 @@ App.MainController = Em.Controller.extend({
               setInterval(function(){self.countDown();}, 1000)
             },
             countDown: function() {
-              this.set('remainTime', this.get('remainTime') - 1);
+              if (this.get('remainTime') > 0) {
+                this.set('remainTime', this.get('remainTime') - 1);
+              }
               if (this.get('remainTime') == 0) {
                 App.router.logOff({});
               }