You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2012/10/25 21:28:44 UTC

svn commit: r1402285 - in /incubator/ambari/branches/AMBARI-666: AMBARI-666-CHANGES.txt ambari-web/app/views/installer/step5_view.js

Author: yusaku
Date: Thu Oct 25 19:28:44 2012
New Revision: 1402285

URL: http://svn.apache.org/viewvc?rev=1402285&view=rev
Log:
AMBARI-902. Fix ZooKeeper badge allocation logic for single host and muliple hosts installation in step5 installer wizard. (Jaimin Jetly via yusaku)

Modified:
    incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step5_view.js

Modified: incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt?rev=1402285&r1=1402284&r2=1402285&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt (original)
+++ incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt Thu Oct 25 19:28:44 2012
@@ -360,6 +360,10 @@ AMBARI-666 branch (unreleased changes)
 
   BUG FIXES
 
+  AMBARI-902. Fix ZooKeeper badge allocation logic for single host and 
+  muliple hosts installation in step5 installer wizard. (Jaimin Jetly via
+  yusaku)
+
   AMBARI-896. Resolve all navigation related issues for Step6 (Slave and
   Client component) of installer wizard. (Jaimin Jetly via yusaku)
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step5_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step5_view.js?rev=1402285&r1=1402284&r2=1402285&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step5_view.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step5_view.js Thu Oct 25 19:28:44 2012
@@ -21,51 +21,54 @@ var App = require('app');
 
 App.InstallerStep5View = Em.View.extend({
 
-	templateName: require('templates/installer/step5'),
-
-	didInsertElement: function () {
-		var controller = this.get('controller');
-		controller.loadStep();
-		if (controller.lastZooKeeper()) {
-			controller.lastZooKeeper().set('showAddControl',true);
-		}
-	}
+  templateName: require('templates/installer/step5'),
 
+  didInsertElement: function () {
+    var controller = this.get('controller');
+    controller.loadStep();
+    if (controller.lastZooKeeper()) {
+      if (controller.get("selectedServicesMasters").filterProperty("component_name", "ZooKeeper").length < controller.get("hosts.length")) {
+        controller.lastZooKeeper().set('showAddControl', true);
+      } else {
+        controller.lastZooKeeper().set('showRemoveControl', false);
+      }
+    }
+  }
 });
 
 App.SelectHostView = Em.Select.extend({
-	content: [],
-	zId: null,
-	selectedHost: null,
-	serviceName: null,
-
-	change: function () {
-		this.get('controller').assignHostToMaster(this.get("serviceName"), this.get("value"), this.get("zId"));
-	},
-
-	didInsertElement: function () {
-		this.set("value", this.get("selectedHost"));
-	}
+  content: [],
+  zId: null,
+  selectedHost: null,
+  serviceName: null,
+
+  change: function () {
+    this.get('controller').assignHostToMaster(this.get("serviceName"), this.get("value"), this.get("zId"));
+  },
+
+  didInsertElement: function () {
+    this.set("value", this.get("selectedHost"));
+  }
 });
 
 App.AddControlView = Em.View.extend({
-	componentName: null,
-	tagName: "span",
-	classNames: ["badge", "badge-important"],
-	template: Ember.Handlebars.compile('+'),
-
-	click: function (event) {
-		this.get('controller').addZookeepers();
-	}
+  componentName: null,
+  tagName: "span",
+  classNames: ["badge", "badge-important"],
+  template: Ember.Handlebars.compile('+'),
+
+  click: function (event) {
+    this.get('controller').addZookeepers();
+  }
 });
 
 App.RemoveControlView = Em.View.extend({
-	zId: null,
-	tagName: "span",
-	classNames: ["badge", "badge-important"],
-	template: Ember.Handlebars.compile('-'),
-
-	click: function (event) {
-		this.get('controller').removeZookeepers(this.get("zId"));
-	}
+  zId: null,
+  tagName: "span",
+  classNames: ["badge", "badge-important"],
+  template: Ember.Handlebars.compile('-'),
+
+  click: function (event) {
+    this.get('controller').removeZookeepers(this.get("zId"));
+  }
 });