You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by rz...@apache.org on 2017/05/02 01:09:29 UTC

ambari git commit: AMBARI-19937 Restart Indicator in Service > Config page does not disappear automatically - page refresh required. (atkach)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 10e6c474c -> ed2369d10


AMBARI-19937 Restart Indicator in Service > Config page does not disappear automatically - page refresh required. (atkach)


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

Branch: refs/heads/branch-2.4
Commit: ed2369d10c0894e4eb8ae4920dae1186e3df6d30
Parents: 10e6c47
Author: Andrii Tkach <at...@apache.org>
Authored: Thu Feb 9 15:41:06 2017 +0200
Committer: Richard Zang <rz...@apache.org>
Committed: Mon May 1 17:45:47 2017 -0700

----------------------------------------------------------------------
 ambari-web/app/mappers/component_config_mapper.js | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ed2369d1/ambari-web/app/mappers/component_config_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/component_config_mapper.js b/ambari-web/app/mappers/component_config_mapper.js
index c1568e0..8df81f4 100644
--- a/ambari-web/app/mappers/component_config_mapper.js
+++ b/ambari-web/app/mappers/component_config_mapper.js
@@ -37,6 +37,18 @@ App.componentConfigMapper = App.QuickDataMapper.create({
   map: function (json) {
     console.time('App.componentConfigMapper execution time');
     var staleConfigHostsMap = App.cache.staleConfigsComponentHosts;
+    var componentsNeedRestart = json.items.mapProperty('ServiceComponentInfo.component_name');
+    var components = App.MasterComponent.find().toArray()
+      .concat(App.ClientComponent.find().toArray())
+      .concat(App.SlaveComponent.find().toArray());
+
+    //clear stale config hosts of component after restart
+    components.forEach(function(component) {
+      if (!componentsNeedRestart.contains(component.get('componentName'))) {
+        staleConfigHostsMap[component.get('componentName')] = [];
+        component.set('staleConfigHosts', []);
+      }
+    });
 
     json.items.forEach(function(item) {
       var componentName = item.ServiceComponentInfo.component_name;