ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject git commit: AMBARI-6267 Add Services fails with a server error under some conditions.(atkach)
Date Wed, 25 Jun 2014 12:29:06 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-1.6.1 c44d574d9 -> b5f6cbbe3


AMBARI-6267 Add Services fails with a server error under some conditions.(atkach)


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

Branch: refs/heads/branch-1.6.1
Commit: b5f6cbbe33a30a0d0d8337c87638789c137c3c19
Parents: c44d574
Author: atkach <atkach@hortonworks.com>
Authored: Wed Jun 25 15:27:45 2014 +0300
Committer: atkach <atkach@hortonworks.com>
Committed: Wed Jun 25 15:29:01 2014 +0300

----------------------------------------------------------------------
 .../app/controllers/wizard/step8_controller.js    | 18 +++++++++++++-----
 ambari-web/app/utils/ajax/ajax.js                 |  2 +-
 2 files changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b5f6cbbe/ambari-web/app/controllers/wizard/step8_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js
index ca25817..c2b29f7 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -1221,11 +1221,19 @@ App.WizardStep8Controller = Em.Controller.extend({
             /**
              * check whether clients are already installed on selected master hosts!!!
              */
-            var clientHosts = App.HostComponent.find().filterProperty("componentName",_client.component_name).filterProperty("workStatus",
"INSTALLED");
-            if (clientHosts.length>0) {
-              clientHosts.mapProperty('hostName').forEach(function (host) {
-                if (hostNames.contains(host)) {
-                  hostNames.splice(hostNames.indexOf(host), 1);
+            var clientHosts = [];
+            var installedHosts = this.get('content.hosts');
+            for (var hostName in installedHosts) {
+              if (installedHosts[hostName].isInstalled &&
+                  installedHosts[hostName].hostComponents.filterProperty('HostRoles.state',
'INSTALLED').mapProperty('HostRoles.component_name').contains(_client.component_name)) {
+                clientHosts.push(hostName);
+              }
+            }
+
+            if (clientHosts.length > 0) {
+              clientHosts.forEach(function (hostName) {
+                if (hostNames.contains(hostName)) {
+                  hostNames.splice(hostNames.indexOf(hostName), 1);
                 }
               }, this);
             }

http://git-wip-us.apache.org/repos/asf/ambari/blob/b5f6cbbe/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 975e3c7..2e29cb0 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -2075,7 +2075,7 @@ var urls = {
     'mock': ''
   },
   'hosts.confirmed': {
-    'real': '/clusters/{clusterName}/hosts?fields=Hosts/cpu_count,Hosts/disk_info,Hosts/total_mem,host_components&minimal_response=true',
+    'real': '/clusters/{clusterName}/hosts?fields=Hosts/cpu_count,Hosts/disk_info,Hosts/total_mem,host_components/HostRoles/state&minimal_response=true',
     'mock': ''
   },
   'host_components.all': {


Mime
View raw message