ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject ambari git commit: AMBARI-19937 Restart Indicator in Service > Config page does not disappear automatically - page refresh required. (atkach)
Date Thu, 09 Feb 2017 13:41:18 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk a6de4ac27 -> 2d11e5059


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/2d11e505
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2d11e505
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2d11e505

Branch: refs/heads/trunk
Commit: 2d11e505939f172404b80d5950ac288c214fa503
Parents: a6de4ac
Author: Andrii Tkach <atkach@apache.org>
Authored: Thu Feb 9 15:41:06 2017 +0200
Committer: Andrii Tkach <atkach@apache.org>
Committed: Thu Feb 9 15:41:06 2017 +0200

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/2d11e505/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;


Mime
View raw message