Browse Source

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

Xi Wang 9 years ago
parent
commit
ac42d479c2
1 changed files with 3 additions and 1 deletions
  1. 3 1
      ambari-web/app/controllers/main.js

+ 3 - 1
ambari-web/app/controllers/main.js

@@ -249,7 +249,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({});
               }