Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 6a09885d5 -> 93820ddfd


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/93820ddf
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/93820ddf
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/93820ddf

Branch: refs/heads/branch-2.6
Commit: 93820ddfde17651dff3bf4786634813824323144
Parents: 6a09885
Author: Andrii Tkach <[email protected]>
Authored: Tue Nov 14 18:23:44 2017 +0200
Committer: Andrii Tkach <[email protected]>
Committed: Tue Nov 14 18:23:44 2017 +0200

----------------------------------------------------------------------
 ambari-web/app/controllers/wizard/step3_controller.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/93820ddf/ambari-web/app/controllers/wizard/step3_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step3_controller.js 
b/ambari-web/app/controllers/wizard/step3_controller.js
index 9358e83..fb41516 100644
--- a/ambari-web/app/controllers/wizard/step3_controller.js
+++ b/ambari-web/app/controllers/wizard/step3_controller.js
@@ -185,6 +185,8 @@ App.WizardStep3Controller = 
Em.Controller.extend(App.ReloadPopupMixin, {
    */
   warningsTimeInterval: 60000,
 
+  finishStates: ["FAILED", "COMPLETED", "TIMEDOUT", "ABORTED"],
+
   /**
    * Are hosts warnings loaded
    * @type {bool}
@@ -1083,7 +1085,7 @@ App.WizardStep3Controller = 
Em.Controller.extend(App.ReloadPopupMixin, {
     if (!data) {
       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) {
@@ -1402,7 +1404,7 @@ App.WizardStep3Controller = 
Em.Controller.extend(App.ReloadPopupMixin, {
     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