Repository: ambari Updated Branches: refs/heads/branch-2.6 665dfa3ef -> e3bbe0a8b
AMBARI-21982 Configs in Hosts page shows 'switch to <conf_group>' even though <conf_group> is already selected. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e3bbe0a8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e3bbe0a8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e3bbe0a8 Branch: refs/heads/branch-2.6 Commit: e3bbe0a8b43ee34ad721543aeb3f426fc07a0bb7 Parents: 665dfa3 Author: Andrii Tkach <[email protected]> Authored: Mon Sep 18 18:05:45 2017 +0300 Committer: Andrii Tkach <[email protected]> Committed: Mon Sep 18 18:05:45 2017 +0300 ---------------------------------------------------------------------- .../main/service/manage_config_groups_controller.js | 6 ++++-- ambari-web/app/templates/common/configs/overriddenProperty.hbs | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/e3bbe0a8/ambari-web/app/controllers/main/service/manage_config_groups_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js index a3f2be9..3c3aa43 100644 --- a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js +++ b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js @@ -381,6 +381,8 @@ App.ManageConfigGroupsController = Em.Controller.extend(App.ConfigOverridable, { */ getNewlyAddedHostComponentsMap: function () { var newlyAddedHostComponentsMap = {}; + var masters = App.router.get('addServiceController.content.masterComponentHosts') || []; + var slaves = App.router.get('addServiceController.content.slaveComponentHosts') || []; var clients = App.router.get('addServiceController.content.clients').filterProperty('isInstalled', false).map(function (component) { return Em.Object.create({ componentName: component.component_name, @@ -388,7 +390,7 @@ App.ManageConfigGroupsController = Em.Controller.extend(App.ConfigOverridable, { }); }); - App.router.get('addServiceController.content.masterComponentHosts').forEach(function (component) { + masters.forEach(function (component) { if (!component.isInstalled) { if (!newlyAddedHostComponentsMap[component.hostName]) { newlyAddedHostComponentsMap[component.hostName] = []; @@ -400,7 +402,7 @@ App.ManageConfigGroupsController = Em.Controller.extend(App.ConfigOverridable, { } }); - App.router.get('addServiceController.content.slaveComponentHosts').forEach(function (component) { + slaves.forEach(function (component) { component.hosts.forEach(function (host) { if (!host.isInstalled) { if (!newlyAddedHostComponentsMap[host.hostName]) { http://git-wip-us.apache.org/repos/asf/ambari/blob/e3bbe0a8/ambari-web/app/templates/common/configs/overriddenProperty.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/common/configs/overriddenProperty.hbs b/ambari-web/app/templates/common/configs/overriddenProperty.hbs index 48bc171..e858f46 100644 --- a/ambari-web/app/templates/common/configs/overriddenProperty.hbs +++ b/ambari-web/app/templates/common/configs/overriddenProperty.hbs @@ -48,7 +48,9 @@ {{/isAuthorized}} <span class="help-inline">{{view.overriddenSCP.errorMessage}}</span> {{else}} - <a class="action">{{view.overriddenSCP.group.switchGroupTextShort}}</a> <i class="icon-spinner"></i> + {{#unless controller.isHostsConfigsPage}} + <a class="action">{{view.overriddenSCP.group.switchGroupTextShort}}</a> <i class="icon-spinner"></i> + {{/unless}} {{/if}} {{/if}} </div>
