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 <[email protected]> Authored: Thu Feb 9 15:41:06 2017 +0200 Committer: Richard Zang <[email protected]> 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;
