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 2018/06/13 13:45:19 UTC

[ambari] branch trunk updated: AMBARI-24089 Cannot add component to 25+ hosts

This is an automated email from the ASF dual-hosted git repository.

atkach pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 5a02c13  AMBARI-24089 Cannot add component to 25+ hosts
5a02c13 is described below

commit 5a02c139cb792696358413091b7df73694495a6a
Author: Andrii Tkach <at...@apache.org>
AuthorDate: Wed Jun 13 14:46:24 2018 +0300

    AMBARI-24089 Cannot add component to 25+ hosts
---
 ambari-web/app/controllers/main/host/bulk_operations_controller.js | 7 ++++---
 ambari-web/app/utils/ajax/ajax.js                                  | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/ambari-web/app/controllers/main/host/bulk_operations_controller.js b/ambari-web/app/controllers/main/host/bulk_operations_controller.js
index 43c1dfd..219f594 100644
--- a/ambari-web/app/controllers/main/host/bulk_operations_controller.js
+++ b/ambari-web/app/controllers/main/host/bulk_operations_controller.js
@@ -503,12 +503,12 @@ App.BulkOperationsController = Em.Controller.extend({
     var allHostsWithComponent = data.items.mapProperty('Hosts.host_name');
     var hostsWithComponent = [];
     hosts.forEach(function (host) {
-      var noHeartBeat = App.Host.find().findProperty('hostName', host.hostName).get('isNotHeartBeating');
-      if(allHostsWithComponent.contains(host.hostName) || noHeartBeat) {
+      const isNotHeartBeating = host.state === 'HEARTBEAT_LOST';
+      if(allHostsWithComponent.contains(host.hostName) || isNotHeartBeating) {
         hostsWithComponent.push(Em.Object.create({
           error: {
             key: host.hostName,
-            message: noHeartBeat ? Em.I18n.t('hosts.bulkOperation.confirmation.add.component.noHeartBeat.skip') : Em.I18n.t('hosts.bulkOperation.confirmation.add.component.skip').format(operationData.componentNameFormatted)
+            message: isNotHeartBeating ? Em.I18n.t('hosts.bulkOperation.confirmation.add.component.noHeartBeat.skip') : Em.I18n.t('hosts.bulkOperation.confirmation.add.component.skip').format(operationData.componentNameFormatted)
           },
           isCollapsed: true,
           isBodyVisible: Em.computed.ifThenElse('isCollapsed', 'display: none;', 'display: block;')
@@ -1073,6 +1073,7 @@ App.BulkOperationsController = Em.Controller.extend({
         id: host.id,
         clusterId: host.cluster_id,
         passiveState: host.passive_state,
+        state: host.state,
         hostName: host.host_name,
         hostComponents: host.host_components
       }
diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js
index 2c63c2f..6606874 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -2860,7 +2860,7 @@ var urls = {
     }
   },
   'hosts.bulk.operations': {
-    real: '/clusters/{clusterName}/hosts?fields=Hosts/host_name,Hosts/maintenance_state,' +
+    real: '/clusters/{clusterName}/hosts?fields=Hosts/host_name,Hosts/host_state,Hosts/maintenance_state,' +
     'host_components/HostRoles/state,host_components/HostRoles/maintenance_state,' +
     'Hosts/total_mem,stack_versions/HostStackVersions,stack_versions/repository_versions/RepositoryVersions/repository_version,' +
     'stack_versions/repository_versions/RepositoryVersions/id,' +

-- 
To stop receiving notification emails like this one, please contact
atkach@apache.org.