Repository: ambari
Updated Branches:
  refs/heads/trunk 9a08bce35 -> 7ffda34d6


AMBARI-21754 /v1/persist API call is made 1000 times per minute after Ambari 
upgrade. (atkach)


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

Branch: refs/heads/trunk
Commit: 7ffda34d6120c65c2a546f0208c1d495e52aa666
Parents: 9a08bce
Author: Andrii Tkach <atk...@apache.org>
Authored: Fri Aug 18 13:23:14 2017 +0300
Committer: Andrii Tkach <atk...@apache.org>
Committed: Fri Aug 18 13:52:21 2017 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/main/host/details.js | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7ffda34d/ambari-web/app/controllers/main/host/details.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/details.js 
b/ambari-web/app/controllers/main/host/details.js
index 20b14ee..abf7673 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -369,13 +369,17 @@ App.MainHostDetailsController = 
Em.Controller.extend(App.SupportClientConfigsDow
     var dfd = $.Deferred();
     var miscController = App.MainAdminServiceAccountsController.create();
     miscController.loadUsers();
-    var interval = setInterval(function () {
+    miscController.addObserver('dataIsLoaded', this, function() {
       if (miscController.get('dataIsLoaded') && miscController.get('users')) {
-        self.set('hdfsUser', miscController.get('users').findProperty('name', 
'hdfs_user').get('value'));
+        if (miscController.get('users').someProperty('name', 'hdfs_user')) {
+          self.set('hdfsUser', 
miscController.get('users').findProperty('name', 'hdfs_user').get('value'));
+        } else {
+          self.set('hdfsUser', '&lt;hdfs-user&gt;');
+        }
         dfd.resolve();
-        clearInterval(interval);
+        miscController.destroy();
       }
-    }, 10);
+    });
     return dfd.promise();
   },
 

Reply via email to