Repository: ambari
Updated Branches:
  refs/heads/trunk d11faab13 -> d0ef1449a


AMBARI-22439 Host check operation is being performed on all hosts during host 
add should not get stuck. (atkach)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d0ef1449
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d0ef1449
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d0ef1449

Branch: refs/heads/trunk
Commit: d0ef1449af23e22ee6b95726ce4ca0b1f3544cc4
Parents: d11faab
Author: Andrii Tkach <atk...@apache.org>
Authored: Tue Nov 14 18:11:56 2017 +0200
Committer: Andrii Tkach <atk...@apache.org>
Committed: Tue Nov 14 18:11:56 2017 +0200

----------------------------------------------------------------------
 ambari-web/app/mixins/main/host/details/actions/check_host.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d0ef1449/ambari-web/app/mixins/main/host/details/actions/check_host.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/main/host/details/actions/check_host.js 
b/ambari-web/app/mixins/main/host/details/actions/check_host.js
index 2e2e021..66baf5a 100644
--- a/ambari-web/app/mixins/main/host/details/actions/check_host.js
+++ b/ambari-web/app/mixins/main/host/details/actions/check_host.js
@@ -111,6 +111,8 @@ App.CheckHostMixin = Em.Mixin.create({
    */
   warningsTimeInterval: 60000,
 
+  finishStates: ["FAILED", "COMPLETED", "TIMEDOUT", "ABORTED"],
+
   /**
    * disables host check on Add host wizard as per the experimental flag
    */
@@ -206,7 +208,7 @@ App.CheckHostMixin = Em.Mixin.create({
       //if resolution host check has corrupted data then skip it
       return this.getGeneralHostCheck();
     }
-    if (["FAILED", "COMPLETED", 
"TIMEDOUT"].contains(data.Requests.request_status)) {
+    if (this.get('finishStates').contains(data.Requests.request_status)) {
       if (data.Requests.inputs.indexOf("last_agent_env_check") != -1) {
         this.set('stopChecking', true);
         this.set('hostsPackagesData', data.tasks.map(function (task) {
@@ -369,7 +371,7 @@ App.CheckHostMixin = Em.Mixin.create({
     data.tasks.forEach(function (task) {
       var name = 
Em.I18n.t('installer.step3.hostWarningsPopup.resolution.validation.error');
       var hostInfo = this.get("hostCheckWarnings").findProperty('name', name);
-      if (["FAILED", "COMPLETED", "TIMEDOUT"].contains(task.Tasks.status)) {
+      if (this.get('finishStates').contains(task.Tasks.status)) {
         if (task.Tasks.status === "COMPLETED" && !!Em.get(task, 
"Tasks.structured_out.host_resolution_check.failed_count")) {
           var targetHostName = Em.get(task, "Tasks.host_name");
           var relatedHostNames = Em.get(task, 
"Tasks.structured_out.host_resolution_check.hosts_with_failures") || [];

Reply via email to