ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lpus...@apache.org
Subject [21/51] [abbrv] ambari git commit: AMBARI-21754 /v1/persist API call is made 1000 times per minute after Ambari upgrade. (atkach)
Date Tue, 22 Aug 2017 11:47:49 GMT
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/feature-branch-AMBARI-21307
Commit: 7ffda34d6120c65c2a546f0208c1d495e52aa666
Parents: 9a08bce
Author: Andrii Tkach <atkach@apache.org>
Authored: Fri Aug 18 13:23:14 2017 +0300
Committer: Andrii Tkach <atkach@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();
   },
 


Mime
View raw message