You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2017/02/09 13:38:01 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.5 0ff74fc31 -> 7921518f5
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/7921518f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7921518f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7921518f
Branch: refs/heads/branch-2.5
Commit: 7921518f56b01312d081590e6c609e3082cf4fdc
Parents: 0ff74fc
Author: Andrii Tkach <at...@apache.org>
Authored: Thu Feb 9 12:55:45 2017 +0200
Committer: Andrii Tkach <at...@apache.org>
Committed: Thu Feb 9 15:37:36 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/7921518f/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;