Browse Source

AMBARI-1292. Add hosts should skip host checks on existing list of cluster nodes. (srimanth via yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1440230 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 năm trước cách đây
mục cha
commit
15bc7c7942
2 tập tin đã thay đổi với 27 bổ sung1 xóa
  1. 5 1
      CHANGES.txt
  2. 22 0
      ambari-web/app/controllers/wizard/step3_controller.js

+ 5 - 1
CHANGES.txt

@@ -175,10 +175,14 @@ Trunk (unreleased changes):
 
  AMBARI-1269. Refactor ResourceProvider SPI. (tbeerbower)
  
- AMBARI-1270. Add predicate objects for checking empty resource category. (tbeerbower)
+ AMBARI-1270. Add predicate objects for checking empty resource category.
+ (tbeerbower)
 
  BUG FIXES
 
+ AMBARI-1292. Add hosts should skip host checks on existing list of cluster
+ nodes. (srimanth via yusaku)
+
  AMBARI-1290. Left border is missing from the summary section on Jobs page.
  (srimanth via yusaku)
 

+ 22 - 0
ambari-web/app/controllers/wizard/step3_controller.js

@@ -644,11 +644,33 @@ App.WizardStep3Controller = Em.Controller.extend({
   }.property('isSubmitDisabled'),
   checksUpdateProgress:0,
   checksUpdateStatus: null,
+  /**
+   * filter data for warnings parse
+   * is data from host in bootStrap
+   * @param data
+   * @return {Object}
+   */
+  filterBootHosts: function(data){
+    var bootHosts = this.get('bootHosts');
+    var filteredData = {
+      href: data.href,
+      items: []
+    };
+    bootHosts.forEach(function(bootHost){
+      data.items.forEach(function(host){
+        if(host.Hosts.host_name == bootHost.get('name')){
+          filteredData.items.push(host);
+        }
+      })
+    })
+    return filteredData;
+  },
   /**
    * parse warnings data for each host and total
    * @param data
    */
   parseWarnings: function(data){
+    data = this.filterBootHosts(data);
     var warnings = [];
     var totalWarnings = {
       hostName: 'All Hosts',