ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject ambari git commit: AMBARI-19240 Ambari UI should use "hosts_with_failures" from "host_resolution_check" in host check. (atkach)
Date Mon, 19 Dec 2016 18:32:13 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 21934340e -> 578e9a266


AMBARI-19240 Ambari UI should use "hosts_with_failures" from "host_resolution_check" in host
check. (atkach)


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

Branch: refs/heads/branch-2.5
Commit: 578e9a266a1999c1e4b737d3e539d28f37ab2e95
Parents: 2193434
Author: Andrii Tkach <atkach@apache.org>
Authored: Mon Dec 19 18:58:43 2016 +0200
Committer: Andrii Tkach <atkach@apache.org>
Committed: Mon Dec 19 20:31:49 2016 +0200

----------------------------------------------------------------------
 ambari-web/app/controllers/wizard/step3_controller.js |  3 +--
 ambari-web/app/utils/ajax/ajax.js                     | 13 ++++++++++++-
 ambari-web/test/controllers/wizard/step3_test.js      |  6 +++---
 3 files changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/578e9a26/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 45180fe..9358e83 100644
--- a/ambari-web/app/controllers/wizard/step3_controller.js
+++ b/ambari-web/app/controllers/wizard/step3_controller.js
@@ -1405,8 +1405,7 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin,
{
       if (["FAILED", "COMPLETED", "TIMEDOUT"].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.failures")
-            ? Em.get(task, "Tasks.structured_out.host_resolution_check.failures").mapProperty('host')
: [];
+          var relatedHostNames = Em.get(task, "Tasks.structured_out.host_resolution_check.hosts_with_failures")
|| [];
           var contextMessage = Em.I18n.t('installer.step3.hostWarningsPopup.resolution.validation.context').format(targetHostName,
relatedHostNames.length + ' ' + Em.I18n.t('installer.step3.hostWarningsPopup.host' + (relatedHostNames.length
== 1 ? '' : 's')));
           var contextMessageLong = Em.I18n.t('installer.step3.hostWarningsPopup.resolution.validation.context').format(targetHostName,
relatedHostNames.join(', '));
           if (!hostInfo) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/578e9a26/ambari-web/app/utils/ajax/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js
index 0a6719b..011999f 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -2177,7 +2177,18 @@ var urls = {
   },
 
   'preinstalled.checks.tasks': {
-    'real': '/requests/{requestId}?fields=tasks/Tasks,Requests/inputs,Requests/request_status',
+    'real': '/requests/{requestId}?fields=Requests/inputs,Requests/request_status,tasks/Tasks/host_name,'
+
+    'tasks/Tasks/structured_out/host_resolution_check/hosts_with_failures,' +
+    'tasks/Tasks/structured_out/host_resolution_check/failed_count,' +
+    'tasks/Tasks/structured_out/installed_packages,' +
+    'tasks/Tasks/structured_out/last_agent_env_check,' +
+    'tasks/Tasks/structured_out/transparentHugePage,' +
+    'tasks/Tasks/stdout,' +
+    'tasks/Tasks/stderr,' +
+    'tasks/Tasks/error_log,' +
+    'tasks/Tasks/command_detail,' +
+    'tasks/Tasks/status' +
+    '&minimal_response=true',
     'mock': '/data/requests/host_check/1.json'
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/578e9a26/ambari-web/test/controllers/wizard/step3_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step3_test.js b/ambari-web/test/controllers/wizard/step3_test.js
index 1e1b3bd..fa90065 100644
--- a/ambari-web/test/controllers/wizard/step3_test.js
+++ b/ambari-web/test/controllers/wizard/step3_test.js
@@ -3076,9 +3076,9 @@ describe('App.WizardStep3Controller', function () {
 
     var data = {
       tasks: [
-        {Tasks: {status: 'COMPLETED', host_name: 'h1', structured_out: {host_resolution_check:
{failed_count: 2, failures: [{host: 'h2'}, {host: 'h3'}]}}}},
-        {Tasks: {status: 'COMPLETED', host_name: 'h4', structured_out: {host_resolution_check:
{failed_count: 2, failures: [{host: 'h5'}, {host: 'h6'}]}}}},
-        {Tasks: {status: 'COMPLETED', host_name: 'h7', structured_out: {host_resolution_check:
{failed_count: 1, failures: [{host: 'h8'}]}}}}
+        {Tasks: {status: 'COMPLETED', host_name: 'h1', structured_out: {host_resolution_check:
{failed_count: 2, hosts_with_failures: ['h2', 'h3']}}}},
+        {Tasks: {status: 'COMPLETED', host_name: 'h4', structured_out: {host_resolution_check:
{failed_count: 2, hosts_with_failures: ['h5', 'h6']}}}},
+        {Tasks: {status: 'COMPLETED', host_name: 'h7', structured_out: {host_resolution_check:
{failed_count: 1, hosts_with_failures: ['h8']}}}}
       ]
     };
     var hostCheckWarnings = [];


Mime
View raw message