Explorar el Código

AMBARI-778. Ensure data flows across all steps in installer wizard. (Jaimin Jetly via yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/branches/AMBARI-666@1393809 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako hace 12 años
padre
commit
ff66974b89

+ 3 - 0
AMBARI-666-CHANGES.txt

@@ -12,6 +12,9 @@ AMBARI-666 branch (unreleased changes)
 
   NEW FEATURES
 
+  AMBARI-778. Ensure data flows across all steps in installer wizard.
+  (Jaimin Jetly via yusaku)
+
   AMBARI-799. Prototype for management spi part 3. (hitesh)
 
   AMBARI-797. Prototype for management spi interface continued. (hitesh)

+ 0 - 8
ambari-web/app/controllers/installer/step2_controller.js

@@ -54,7 +54,6 @@ App.InstallerStep2Controller = Em.Controller.extend({
 
   validateHostNames: function () {
     this.hostNameArr = this.get('hostNames').trim().split(new RegExp("\\s+","g"));
-   // this.hostNameArr = this.get('hostNames').trim().match(/\w+|"[^"]+"/g);
     for (var index in this.hostNameArr) {
       console.log("host name is: " + this.hostNameArr[index]);
       //TODO: other validation for hostnames will be covered over here
@@ -165,12 +164,6 @@ App.InstallerStep2Controller = Em.Controller.extend({
 
 
   evaluateStep2: function () {
-    //task4 = Storing ambari agent Install type in localStorage (installType maps at host level and so every host will have this as an property)
-    //task5 = Storing path of software repository(remote/local repo) to localStorage
-    //task6 = call to rest API: @Post http://ambari_server/api/bootstrap
-    //task7 = On Manual Install, next button click pops up a warning with "proceed" and "close" buttons
-    //task8 = On faliure of the previous call, show 'error injecting host information in server db'
-    //task9 = On success of the previous call, go to step 3
 
     console.log('TRACE: Entering controller:InstallerStep2:evaluateStep2 function');
     console.log('value of manual install is: ' + this.get('manualInstall'));
@@ -202,7 +195,6 @@ App.InstallerStep2Controller = Em.Controller.extend({
       App.db.setSoftRepo({ 'repoType': 'local', 'repoPath': this.get('localRepoPath') });
     }
 
-    // Just an additional check. If manualInstall is true, program should have not reached over here
     if (this.get('manualInstall') === false) {
       // For now using mock jquery call
       //TODO: hook up with bootstrap call

+ 38 - 11
ambari-web/app/controllers/installer/step3_controller.js

@@ -54,6 +54,7 @@ App.InstallerStep3Controller = Em.ArrayController.extend({
   },
 
   /* renders the set of passed hosts */
+
   renderHosts: function (hostsInfo) {
     var self = this;
     hostsInfo.forEach(function (_hostInfo) {
@@ -76,6 +77,8 @@ App.InstallerStep3Controller = Em.ArrayController.extend({
       var host = hostsFrmContent.findProperty('name', _hostFrmServer.name);
       if (host !== null && host !== undefined) { // check if hostname extracted from REST API data matches any hostname in content
         host.set('status', _hostFrmServer.status);
+        host.set('cpu', _hostFrmServer.cpu);
+        host.set('memory', _hostFrmServer.memory);
       }
     });
     result = !this.content.someProperty('status', 'pending');
@@ -119,12 +122,6 @@ App.InstallerStep3Controller = Em.ArrayController.extend({
      this.doBootstrap();
      */
 
-    //TODO: comment below lines while hooking up with actual @GET bootstrap API
-    var mockHosts = this.mockRetryData;
-    mockHosts.forEach(function (_host) {
-      console.log('Retrying:  ' + _host.name);
-    });
-    this.parseHostInfo(mockHosts, selectedHosts);
   },
 
   removeHosts: function (hosts) {
@@ -190,12 +187,23 @@ App.InstallerStep3Controller = Em.ArrayController.extend({
     // this.set('isSubmitDisabled',false);
   },
 
+  saveHostInfoToDb: function() {
+    var hostInfo = {};
+    var succededHosts = this.filterProperty('status', 'success');
+    succededHosts.forEach(function(_host){
+      hostInfo[_host.name] = {
+        name: _host.name,
+        cpu: _host.cpu,
+        memory: _host.memory
+      };
+    });
+    App.db.setHosts(hostInfo);
+  },
+
   submit: function () {
     if (!this.get('isSubmitDisabled')) {
-      var erroneousHosts = this.filterProperty('status', 'error');
-      console.log("INFO: Removing erroneous hosts before moving to step4");
-      this.removeHosts(erroneousHosts);
-      App.get('router').transitionTo('step4');
+      this.saveHostInfoToDb();
+      App.router.send('next');
     }
   },
   hostLogPopup: function (event) {
@@ -215,7 +223,26 @@ App.InstallerStep3Controller = Em.ArrayController.extend({
     this.set('isSubmitDisabled', false);
     var hostInfo = this.mockData;
     this.renderHosts(hostInfo);
+  },
+
+  pollBtn: function () {
+    if (this.get('isSubmitDisabled')) {
+      return;
+    }
+    var hosts = this.visibleHosts();
+    var selectedHosts = hosts.filterProperty('isChecked', true);
+    selectedHosts.forEach(function (_host) {
+      console.log('Retrying:  ' + _host.name);
+    });
+
+    var mockHosts = this.mockRetryData;
+    mockHosts.forEach(function (_host) {
+      console.log('Retrying:  ' + _host.name);
+    });
+    if(this.parseHostInfo(mockHosts, selectedHosts)) {
+      this.saveHostInfoToDb();
+    }
   }
 
-});
+  });
 

+ 313 - 116
ambari-web/app/controllers/installer/step5_controller.js

@@ -18,88 +18,305 @@
 
 var App = require('app');
 
-//mock data
+App.InstallerStep5Controller = Em.Controller.extend({
+  //properties
+  name: "installerStep5Controller",
+  hosts: [],
+  selectedServices: [],
+  selectedServicesMasters: [],
+  components: require('data/mock/service_components'),
 
-//input
-App.selectedServices = [ 'HDFS', 'MapReduce', 'Ganglia', 'Nagios', 'HBase', 'Pig', 'Sqoop', 'Oozie', 'Hive', 'ZooKeeper'];
+  /*
+   Below function retrieves host information from local storage
+   */
 
-App.hosts = [
-  {
-    host_name: 'host1',
-    cluster_name: "test",
-    total_mem: 7,
-    cpu_count: 2
+  clearStep: function () {
+    this.set('hosts', []);
+    this.set('selectedServices', []);
+    this.set('selectedServicesMasters', []);
+    //this.selectedServices = [];
+    //this.selectedServicesMasters = [];
   },
-  {
-    host_name: 'host2',
-    cluster_name: "test",
-    total_mem: 4,
-    cpu_count: 2
+
+  loadStep: function () {
+    this.clearStep();
+    this.renderHostInfo(this.loadHostInfo());
+    this.renderComponents(this.loadComponents(this.loadServices()));
   },
-  {
-    host_name: 'host3',
-    cluster_name: "test",
-    total_mem: 8,
-    cpu_count: 2
+
+  loadHostInfo: function () {
+    //this.clear();
+    var hostInfo = [];
+    hostInfo = App.db.getHosts();
+    var hosts = new Ember.Set();
+    for (var index in hostInfo) {
+      hosts.add(hostInfo[index]);
+      console.log("TRACE: host name is: " + hostInfo[index].name);
+    }
+    return hosts;
   },
-  {
-    host_name: 'host4',
-    cluster_name: "test",
-    total_mem: 8,
-    cpu_count: 2
+
+  renderHostInfo: function (hostsInfo) {
+
+    var zookeeperComponent = null, componentObj = null, hostObj = null;
+    // this._super();
+
+    //wrap the model data into
+
+    hostsInfo.forEach(function (_host) {
+      var hostObj = Ember.Object.create({
+        host_name: _host.name,
+        cpu: _host.cpu,
+        memory: _host.memory
+      });
+      console.log('pushing ' + hostObj.host_name);
+      hostObj.set("host_info", "" + hostObj.get("host_name") + " ( " + hostObj.get("memory") + "GB" + " " + hostObj.get("cpu") + "cores )");
+      this.get("hosts").pushObject(hostObj);
+    }, this);
   },
-  {
-    host_name: 'host5',
-    cluster_name: "test",
-    total_mem: 8,
-    cpu_count: 2
-  }
-];
 
-App.masterServices = [
-  {
-    component_name: "NameNode",
-    selectedHost: 'host1',
-    availableHosts: [] // filled dynAmically
+
+  loadServices: function () {
+    var services = App.db.getSelectedServiceNames();
+    services.forEach(function (item) {
+      console.log("TRACE: service name is: " + item);
+      this.get("selectedServices").pushObject(Ember.Object.create({service_name: item}));
+    }, this);
+
+    return services;
+
   },
-  {
-    component_name: "ZooKeeper",
-    selectedHost: 'host3',
-    availableHosts: [] // filled dynAmically
+
+  loadComponents: function (services) {
+    var self = this;
+    var components = new Ember.Set();
+
+    var masterComponents = self.components.filterProperty('isMaster', true);
+    for (var index in services) {
+      var componentInfo = masterComponents.filterProperty('service_name', services[index]);
+      componentInfo.forEach(function (_componentInfo) {
+        console.log("TRACE: master component name is: " + _componentInfo.display_name);
+        var componentObj = {};
+        componentObj.component_name = _componentInfo.display_name;
+        componentObj.selectedHost = this.selectHost(_componentInfo.component_name);   // call the method that plays selectNode algorithm or fetches from server
+        componentObj.availableHosts = [];
+        components.add(componentObj);
+      }, this);
+    }
+
+    return components;
   },
-  {
-    component_name: "JobTracker",
-    selectedHost: 'host2',
-    availableHosts: [] // filled dynAmically
+
+  renderComponents: function (masterComponents) {
+    var self = this;
+    var zookeeperComponent = null, componentObj = null;
+
+    masterComponents.forEach(function (item) {
+      //add the zookeeper component at the end if exists
+      if (item.component_name === "ZooKeeper") {
+        zookeeperComponent = Ember.Object.create(item);
+      } else {
+        componentObj = Ember.Object.create(item);
+        componentObj.set("availableHosts", this.get("hosts").slice(0));
+        self.get("selectedServicesMasters").pushObject(componentObj);
+      }
+    }, this);
+
+    //while initialization of the controller there will be only 1 zookeeper server
+
+    if (zookeeperComponent) {
+      zookeeperComponent.set("showAddControl", true);
+      zookeeperComponent.set("showRemoveControl", false);
+      zookeeperComponent.set("zId", 1);
+      zookeeperComponent.set("availableHosts", this.get("hosts").slice(0));
+      this.get("selectedServicesMasters").pushObject(Ember.Object.create(zookeeperComponent));
+    }
+
   },
-  {
-    component_name: "HBase Master",
-    selectedHost: 'host3',
-    availableHosts: [] // filled dynAmically
-  }
-];
-
-//mapping format
-//masterHostMapping = [
-//    {
-//      host_name: 'host1',
-//      masterServices: [{component_name:"NamedNode"}, {component_name:"Jobtracker"}]
-//    },
-//    {
-//      host_name: 'host2',
-//      masterServices: [{component_name:"NamedNode"}, {component_name:"Jobtracker"}]
-//    }
-//  ];
-
-//end - mock data
 
-App.InstallerStep5Controller = Em.Controller.extend({
-  //properties
-  name: "installerStep5Controller",
+  getKerberosServer: function (noOfHosts) {
+    var hosts = this.get('hosts');
+    if (noOfHosts === 1) {
+      return hosts[0];
+    } else if (noOfHosts < 3) {
+      return hosts[1];
+    } else if (noOfHosts <= 5) {
+      return hosts[1];
+    } else if (noOfHosts <= 30) {
+      return hosts[3];
+    } else {
+      return hosts[5];
+    }
+  },
+
+  getNameNode: function (noOfHosts) {
+    var hosts = this.get('hosts');
+    return hosts[0];
+  },
+
+  getSNameNode: function (noOfHosts) {
+    var hosts = this.get('hosts');
+    if (noOfHosts === 1) {
+      return hosts[0];
+    } else {
+      return hosts[1];
+    }
+  },
+
+  getJobTracker: function (noOfHosts) {
+    var hosts = this.get('hosts');
+    if (noOfHosts === 1) {
+      return hosts[0];
+    } else if (noOfHosts < 3) {
+      return hosts[1];
+    } else if (noOfHosts <= 5) {
+      return hosts[1];
+    } else if (noOfHosts <= 30) {
+      return hosts[1];
+    } else {
+      return hosts[2];
+    }
+  },
+
+  getHBaseMaster: function (noOfHosts) {
+    var hosts = this.get('hosts');
+    if (noOfHosts === 1) {
+      return hosts[0];
+    } else if (noOfHosts < 3) {
+      return hosts[0];
+    } else if (noOfHosts <= 5) {
+      return hosts[0];
+    } else if (noOfHosts <= 30) {
+      return hosts[2];
+    } else {
+      return hosts[3];
+    }
+  },
+
+  getOozieServer: function (noOfHosts) {
+    var hosts = this.get('hosts');
+    if (noOfHosts === 1) {
+      return hosts[0];
+    } else if (noOfHosts < 3) {
+      return hosts[1];
+    } else if (noOfHosts <= 5) {
+      return hosts[1];
+    } else if (noOfHosts <= 30) {
+      return hosts[2];
+    } else {
+      return hosts[3];
+    }
+  },
+
+  getOozieServer: function (noOfHosts) {
+    var hosts = this.get('hosts');
+    if (noOfHosts === 1) {
+      return hosts[0];
+    } else if (noOfHosts < 3) {
+      return hosts[1];
+    } else if (noOfHosts <= 5) {
+      return hosts[1];
+    } else if (noOfHosts <= 30) {
+      return hosts[2];
+    } else {
+      return hosts[3];
+    }
+  },
+
+  getHiveServer: function (noOfHosts) {
+    var hosts = this.get('hosts');
+    if (noOfHosts === 1) {
+      return hosts[0];
+    } else if (noOfHosts < 3) {
+      return hosts[1];
+    } else if (noOfHosts <= 5) {
+      return hosts[1];
+    } else if (noOfHosts <= 30) {
+      return hosts[2];
+    } else {
+      return hosts[4];
+    }
+  },
+
+  getTempletonServer: function (noOfHosts) {
+    var hosts = this.get('hosts');
+    if (noOfHosts === 1) {
+      return hosts[0];
+    } else if (noOfHosts < 3) {
+      return hosts[1];
+    } else if (noOfHosts <= 5) {
+      return hosts[1];
+    } else if (noOfHosts <= 30) {
+      return hosts[2];
+    } else {
+      return hosts[4];
+    }
+  },
+
+  getZooKeeperServer: function (noOfHosts) {
+    var hosts = this.get('hosts');
+    return hosts[0];
+  },
+
+  getGangliaServer: function (noOfHosts) {
+    var hosts = this.get('hosts');
+    var hostnames = [];
+    var inc = 0;
+    hosts.forEach(function (_hostname) {
+      hostnames[inc] = _hostname.host_name;
+      inc++;
+    });
+    var hostExcAmbari = hostnames.without(location.hostname);
+    if (hostExcAmbari !== null || hostExcAmbari !== undefined || hostExcAmbari.length !== 0) {
+      return hostExcAmbari[0];
+    } else {
+      return hostnames[0];
+    }
+  },
+
+  getNagiosServer: function (noOfHosts) {
+    var hosts = this.get('hosts');
+    var hostnames = [];
+    var inc = 0;
+    hosts.forEach(function (_hostname) {
+      hostnames[inc] = _hostname.host_name;
+      inc++;
+    });
+    var hostExcAmbari = hostnames.without(location.hostname);
+    if (hostExcAmbari !== null || hostExcAmbari !== undefined || hostExcAmbari.length !== 0) {
+      return hostExcAmbari[0];
+    } else {
+      return hostnames[0];
+    }
+  },
+
+  selectHost: function (componentName) {
+    var noOfHosts = this.get('hosts').length;
+    if (componentName === 'KERBEROS_SERVER') {
+      return this.getKerberosServer(noOfHosts).host_name;
+    } else if (componentName === 'NAMENODE') {
+      return this.getNameNode(noOfHosts).host_name;
+    } else if (componentName === 'SNAMENODE') {
+      return this.getSNameNode(noOfHosts).host_name;
+    } else if (componentName === 'JOBTRACKER') {
+      return this.getJobTracker(noOfHosts).host_name;
+    } else if (componentName === 'HBASE_MASTER') {
+      return this.getHBaseMaster(noOfHosts).host_name;
+    } else if (componentName === 'OOZIE_SERVER') {
+      return this.getOozieServer(noOfHosts).host_name;
+    } else if (componentName === 'HIVE_SERVER') {
+      return this.getHiveServer(noOfHosts).host_name;
+    } else if (componentName === 'TEMPLETON_SERVER') {
+      return this.getTempletonServer(noOfHosts).host_name;
+    } else if (componentName === 'ZOOKEEPER_SERVER') {
+      return this.getZooKeeperServer(noOfHosts).host_name;
+    } else if (componentName === 'GANGLIA_MONITOR_SERVER') {
+      return this.getGangliaServer(noOfHosts);
+    } else if (componentName === 'NAGIOS_SERVER') {
+      return this.getNagiosServer(noOfHosts);
+    }
+  },
 
-  hosts: [],
-  selectedServices: [],
-  selectedServicesMasters: [],
 
   masterHostMapping: function () {
     var mapping = [], mappingObject, self = this, mappedHosts, hostObj, hostInfo;
@@ -109,7 +326,7 @@ App.InstallerStep5Controller = Em.Controller.extend({
 
     mappedHosts.forEach(function (item) {
       hostObj = self.get("hosts").findProperty("host_name", item);
-      hostInfo = " ( " + hostObj.get("total_mem") + "GB" + " " + hostObj.get("cpu_count") + "cores )";
+      hostInfo = " ( " + hostObj.get("memory") + "GB" + " " + hostObj.get("cpu") + "cores )";
 
       mappingObject = Ember.Object.create({
         host_name: item,
@@ -175,6 +392,7 @@ App.InstallerStep5Controller = Em.Controller.extend({
      * minimum 1 ZooKeeper master in total, and
      * maximum 1 ZooKeeper on every host
      */
+
     var maxNumZooKeepers = this.get("hosts.length"),
       currentZooKeepers = this.get("selectedServicesMasters").filterProperty("component_name", "ZooKeeper"),
       newZookeeper = null,
@@ -182,13 +400,15 @@ App.InstallerStep5Controller = Em.Controller.extend({
       suggestedHost = null,
       i = 0,
       lastZoo = null;
-
+    console.log('hosts legth is: ' + maxNumZooKeepers);
     //work only if the Zookeeper service is selected in previous step
-    if (!this.get("selectedServices").mapProperty("service_name").contains("ZooKeeper")) {
+    if (!this.get("selectedServices").mapProperty("service_name").contains("ZOOKEEPER")) {
+      console.log('ALERT: Zookeeper service was not selected');
       return false;
     }
 
     if (currentZooKeepers.get("length") < maxNumZooKeepers) {
+      console.log('currentZookeeper length less than maximum. Its: ' + currentZooKeepers.get("length"))
       currentZooKeepers.set("lastObject.showAddControl", false);
       if (currentZooKeepers.get("length") > 1) {
         currentZooKeepers.set("lastObject.showRemoveControl", true);
@@ -234,7 +454,7 @@ App.InstallerStep5Controller = Em.Controller.extend({
     var currentZooKeepers;
 
     //work only if the Zookeeper service is selected in previous step
-    if (!this.get("selectedServices").mapProperty("service_name").contains("ZooKeeper")) {
+    if (!this.get("selectedServices").mapProperty("service_name").contains("ZOOKEEPER")) {
       return false;
     }
 
@@ -283,7 +503,7 @@ App.InstallerStep5Controller = Em.Controller.extend({
 
   sortHostsByConfig: function (a, b) {
     //currently handling only total memory on the host
-    if (a.total_mem < b.total_mem) {
+    if (a.memory < b.memory) {
       return 1;
     }
     else {
@@ -300,52 +520,29 @@ App.InstallerStep5Controller = Em.Controller.extend({
     }
   },
 
-  /*
-   * Initialize the model data
-   */
-  init: function () {
-    var zookeeperComponent = null, componentObj = null, hostObj = null;
-    this._super();
-
-    //wrap the model data into
-
-    App.hosts.forEach(function (item) {
-      hostObj = Ember.Object.create(item);
-      hostObj.set("host_info", "" + hostObj.get("host_name") + " ( " + hostObj.get("total_mem") + "GB" + " " + hostObj.get("cpu_count") + "cores )");
-      this.get("hosts").pushObject(hostObj);
-    }, this);
-
-    //sort the hosts
-    this.get("hosts").sort(this.sortHostsByConfig);
-
-    //todo: build masters from config instead
-    App.masterServices.forEach(function (item) {
-      //add the zookeeper component at the end if exists
-      if (item.component_name === "ZooKeeper") {
-        zookeeperComponent = Ember.Object.create(item);
-      } else {
-        componentObj = Ember.Object.create(item);
-        componentObj.set("availableHosts", this.get("hosts").slice(0));
-        this.get("selectedServicesMasters").pushObject(componentObj);
-      }
-    }, this);
-
-    //while initialization of the controller there will be only 1 zookeeper server
+  saveComponentHostsToDb: function () {
+    var obj = this.get('selectedServicesMasters');
+    var masterComponentHosts = [];
+    var inc = 0;
+    var array = [];
+    obj.forEach(function (_component) {
+      var hostArr = [];
+      masterComponentHosts.push({
+        component: _component.component_name,
+        hostName: _component.selectedHost
+      });
+    });
 
-    if (zookeeperComponent) {
-      zookeeperComponent.set("showAddControl", true);
-      zookeeperComponent.set("showRemoveControl", false);
-      zookeeperComponent.set("zId", 1);
-      zookeeperComponent.set("availableHosts", this.get("hosts").slice(0));
-      this.get("selectedServicesMasters").pushObject(Ember.Object.create(zookeeperComponent));
-    }
+    App.db.setMasterComponentHosts(masterComponentHosts);
 
-    App.selectedServices.forEach(function (item) {
-      this.get("selectedServices").pushObject(Ember.Object.create({service_name: item}));
-    }, this);
+  },
 
+  submit: function () {
+    this.saveComponentHostsToDb();
+    App.router.send('next');
   }
 
+
 });
 
 

+ 70 - 34
ambari-web/app/controllers/installer/step6_controller.js

@@ -17,6 +17,7 @@
  */
 
 var App = require('app');
+var db = require('utils/db');
 
 /**
  * By Step 6, we have the following information stored in App.db and set on this
@@ -35,81 +36,114 @@ App.InstallerStep6Controller = Em.Controller.extend({
 
   hosts: [],
   // TODO: hook up with user host selection
-  rawHosts: require('data/mock/hosts'),
+  rawHosts: [],
   selectedServiceNames: null,
   masterComponentHosts: require('data/mock/master_component_hosts'),
+  showHbase: false,
 
-  hasMasterComponents: function(hostname) {
+  hasMasterComponents: function (hostname) {
     var hasMaster = false;
-    this.get('masterComponentHosts').forEach(function(masterComponent) {
-      if (masterComponent.hosts.contains(hostname)) {
-        hasMaster = true;
-      }
-    });
-    return hasMaster;
+    var masterComponentHosts = db.getMasterComponentHosts();
+    return masterComponentHosts.someProperty('hostName', hostname);
   },
 
-  isAllDataNodes: function() {
+
+  isAllDataNodes: function () {
     return this.get('hosts').everyProperty('isDataNode', true);
   }.property('hosts.@each.isDataNode'),
 
-  isAllTaskTrackers: function() {
+  isAllTaskTrackers: function () {
     return this.get('hosts').everyProperty('isTaskTracker', true);
   }.property('hosts.@each.isTaskTracker'),
 
-  isAllRegionServers: function() {
+  isAllRegionServers: function () {
     return this.get('hosts').everyProperty('isRegionServer', true);
   }.property('hosts.@each.isRegionServer'),
 
-  isNoDataNodes: function() {
+  isNoDataNodes: function () {
     return this.get('hosts').everyProperty('isDataNode', false);
   }.property('hosts.@each.isDataNode'),
 
-  isNoTaskTrackers: function() {
+  isNoTaskTrackers: function () {
     return this.get('hosts').everyProperty('isTaskTracker', false);
   }.property('hosts.@each.isTaskTracker'),
 
-  isNoRegionServers: function() {
+  isNoRegionServers: function () {
     return this.get('hosts').everyProperty('isRegionServer', false);
   }.property('hosts.@each.isRegionServer'),
 
-  selectAllDataNodes: function() {
+  isHbaseSelected: function () {
+    var services = db.getSelectedServiceNames();
+    console.log('isHbase selected is: ' + services.contains('HBASE'));
+    return services.contains('HBASE');
+  },
+
+
+  selectAllDataNodes: function () {
     this.get('hosts').setEach('isDataNode', true);
   },
 
-  selectAllTaskTrackers: function() {
+  selectAllTaskTrackers: function () {
     this.get('hosts').setEach('isTaskTracker', true);
   },
 
-  selectAllRegionServers: function() {
+  selectAllRegionServers: function () {
     this.get('hosts').setEach('isRegionServer', true);
   },
 
-  deselectAllDataNodes: function() {
+  deselectAllDataNodes: function () {
     this.get('hosts').setEach('isDataNode', false);
   },
 
-  deselectAllTaskTrackers: function() {
+  deselectAllTaskTrackers: function () {
     this.get('hosts').setEach('isTaskTracker', false);
   },
 
-  deselectAllRegionServers: function() {
+  deselectAllRegionServers: function () {
     this.get('hosts').setEach('isRegionServer', false);
   },
 
-  init: function() {
-    this._super();
-    this.get('rawHosts').forEach(function(host) {
-      host.isDataNode = host.isTaskTracker = host.isRegionServer = !this.hasMasterComponents(host.hostname);
-      this.get('hosts').pushObject(Ember.Object.create(host));
-    }, this);
+  loadStep: function () {
+    this.set('hosts',[]);
+    this.set('showHbase',this.isHbaseSelected());
+    this.setSlaveHost(this.getHostNames());
+  },
+
+  setSlaveHost: function (hostNames) {
+    hostNames.forEach(function (_hostName) {
+      this.get('hosts').pushObject(Ember.Object.create({
+        hostname: _hostName,
+        isDataNode: !this.hasMasterComponents(_hostName),
+        isTaskTracker: !this.hasMasterComponents(_hostName),
+        isRegionServer: !this.hasMasterComponents(_hostName)
+      }));
+    },this);
   },
 
-  validate: function() {
+  getHostNames: function () {
+    var hostInfo = db.getHosts();
+    var hostNames = [];
+    for (var index in hostInfo) {
+      hostNames.push(hostInfo[index].name);
+
+    }
+    return hostNames;
+  },
+
+
+  /*  init: function () {
+   this._super();
+   this.get('rawHosts').forEach(function (host) {
+   host.isDataNode = host.isTaskTracker = host.isRegionServer = !this.hasMasterComponents(host.hostname);
+   this.get('hosts').pushObject(Ember.Object.create(host));
+   }, this);
+   },
+   */
+  validate: function () {
     return !(this.get('isNoDataNodes') || this.get('isNoTaskTrackers') || this.get('isNoRegionServers'));
   },
 
-  submit: function() {
+  submit: function () {
     if (!this.validate()) {
       this.set('errorMessage', Ember.I18n.t('installer.step6.error.mustSelectOne'));
       return;
@@ -133,13 +167,13 @@ App.InstallerStep6Controller = Em.Controller.extend({
           group: 'Default'
         });
       }
-      if (host.get('isRegionServer')) {
+      if (this.isHbaseSelected() && host.get('isRegionServer')) {
         regionServerHosts.push({
           hostname: host.hostname,
           group: 'Default'
         });
       }
-    });
+    },this);
 
     var slaveComponentHosts = [];
     slaveComponentHosts.push({
@@ -150,10 +184,12 @@ App.InstallerStep6Controller = Em.Controller.extend({
       componentName: 'TaskTracker',
       hosts: taskTrackerHosts
     });
-    slaveComponentHosts.push({
-      componentName: 'RegionServer',
-      hosts: regionServerHosts
-    });
+    if (this.isHbaseSelected()) {
+      slaveComponentHosts.push({
+        componentName: 'RegionServer',
+        hosts: regionServerHosts
+      });
+    }
 
     App.db.setSlaveComponentHosts(slaveComponentHosts);
 

+ 31 - 16
ambari-web/app/controllers/installer/step7_controller.js

@@ -17,6 +17,7 @@
  */
 
 var App = require('app');
+var db = require('utils/db');
 
 /**
  * By Step 7, we have the following information stored in App.db and set on this
@@ -27,6 +28,7 @@ var App = require('app');
  *   slaveComponentHosts: App.db.slaveComponentHosts (slave-components-to-hosts mapping the user selected in Step 6)
  *
  */
+
 App.InstallerStep7Controller = Em.ArrayController.extend({
 
   name: 'installerStep7Controller',
@@ -37,7 +39,7 @@ App.InstallerStep7Controller = Em.ArrayController.extend({
 
   slaveHostToGroup: null,
 
-  isSubmitDisabled: function() {
+  isSubmitDisabled: function () {
     return !this.everyProperty('errorCount', 0);
   }.property('@each.errorCount'),
 
@@ -48,18 +50,18 @@ App.InstallerStep7Controller = Em.ArrayController.extend({
 
   doInit: true,
 
-  loadConfigs: function() {
+  loadConfigs: function () {
 
     // load dependent data from the database
-    var selectedServiceNamesInDB = App.db.getSelectedServiceNames();
+    var selectedServiceNamesInDB = db.getSelectedServiceNames();
     if (selectedServiceNamesInDB !== undefined) {
       this.set('selectedServiceNames', selectedServiceNamesInDB);
     }
-    var masterComponentHostsInDB = App.db.getMasterComponentHosts();
+    var masterComponentHostsInDB = db.getMasterComponentHosts();
     if (masterComponentHostsInDB != undefined) {
       this.set('masterComponentHosts', masterComponentHostsInDB);
     }
-    var slaveComponentHostsInDB = App.db.getSlaveComponentHosts();
+    var slaveComponentHostsInDB = db.getSlaveComponentHosts();
     if (slaveComponentHostsInDB != undefined) {
       this.set('slaveComponentHosts', slaveComponentHostsInDB);
     }
@@ -72,7 +74,7 @@ App.InstallerStep7Controller = Em.ArrayController.extend({
 
       this.set('content', []);
 
-      serviceConfigs.forEach(function(_serviceConfig) {
+      serviceConfigs.forEach(function (_serviceConfig) {
         var serviceConfig = App.ServiceConfig.create({
           serviceName: _serviceConfig.serviceName,
           displayName: _serviceConfig.displayName,
@@ -81,7 +83,7 @@ App.InstallerStep7Controller = Em.ArrayController.extend({
         });
 
         if (self.selectedServiceNames.contains(serviceConfig.serviceName) || serviceConfig.serviceName === 'MISC') {
-          _serviceConfig.configs.forEach(function(_serviceConfigProperty) {
+          _serviceConfig.configs.forEach(function (_serviceConfigProperty) {
             var serviceConfigProperty = App.ServiceConfigProperty.create(_serviceConfigProperty);
             serviceConfigProperty.serviceConfig = serviceConfig;
             serviceConfig.configs.pushObject(serviceConfigProperty);
@@ -100,15 +102,28 @@ App.InstallerStep7Controller = Em.ArrayController.extend({
     }
   },
 
-  submit: function() {
+  submit: function () {
     if (!this.get('isSubmitDisabled')) {
       // TODO:
       // save service configs in App.db (localStorage)
-      App.get('router').transitionTo('step8');
+      var serviceConfigProperties = [];
+      this.content.forEach(function(_content){
+        var config = [];
+        config = _content.configs;
+        config.forEach(function(_configProperties){
+          serviceConfigProperties.push(_configProperties);
+          console.log('TRACE: pushing: ' + _configProperties.name);
+          console.log('INFO: value: ' + _configProperties.value);
+        },this);
+
+      },this);
+      db.setServiceConfigProperties(serviceConfigProperties);
+      App.router.send('next');
+      //App.get('router').transitionTo('step8');
     }
   },
 
-  showMasterHosts: function(event) {
+  showMasterHosts: function (event) {
     var serviceConfig = event.context;
     App.ModalPopup.show({
       header: serviceConfig.category + ' Hosts',
@@ -119,7 +134,7 @@ App.InstallerStep7Controller = Em.ArrayController.extend({
     });
   },
 
-  showSlaveHosts: function(event) {
+  showSlaveHosts: function (event) {
     var serviceConfig = event.context;
     App.ModalPopup.show({
       header: serviceConfig.category + ' Hosts',
@@ -138,7 +153,7 @@ App.SlaveComponentGroupsController = Ember.ArrayController.extend({
 
   contentBinding: 'App.router.installerStep7Controller.slaveComponentHosts',
 
-  selectedComponentName: function() {
+  selectedComponentName: function () {
     switch (App.router.get('installerStep7Controller.selectedService.serviceName')) {
       case 'HDFS':
         return 'DataNode';
@@ -158,20 +173,20 @@ App.SlaveComponentGroupsController = Ember.ArrayController.extend({
         controllerBinding: 'App.router.slaveComponentGroupsController',
         templateName: require('templates/installer/slave_hosts_popup')
       }),
-      onPrimary: function() {
+      onPrimary: function () {
       }
     });
   },
 
-  showEditSlaveComponentGroups: function(event) {
+  showEditSlaveComponentGroups: function (event) {
     this.showAddSlaveComponentGroup(event);
   },
 
-  hosts: function() {
+  hosts: function () {
     return this.findProperty('componentName', this.get('selectedComponentName')).hosts;
   }.property('@each.hosts', 'selectedComponentName'),
 
-  groups: function() {
+  groups: function () {
     return this.findProperty('componentName', this.get('selectedComponentName')).hosts.mapProperty('group').uniq();
   }.property('@each.hosts', 'selectedComponentName')
 

+ 43 - 12
ambari-web/app/data/mock/step3_hosts.js

@@ -1,50 +1,81 @@
 module.exports = new Ember.Set([
   {
     name: '192.168.1.1',
-    status: 'success'
+    status: 'pending',
+    cpu: '2',
+    memory: '2'
   },
   {
     name: '192.168.1.2',
-    status: 'success'
+    status: 'success',
+    cpu: '4',
+    memory: '4'
   },
   {
     name: '192.168.1.3',
-    status: 'pending'
+    status: 'pending',
+    cpu: '2',
+    memory: '2'
   },
   {
     name: '192.168.1.4',
-    status: 'error'
+    status: 'pending',
+    cpu: '2',
+    memory: '4'
   },
   {
     name: '192.168.1.5',
-    status: 'success'
+    status: 'success',
+    cpu: '2',
+    memory: '4'
   },
   {
     name: '192.168.1.6',
-    status: 'success'
+    status: 'pending',
+    cpu: '4',
+    memory: '8'
   },
   {
     name: '192.168.1.7',
-    status: 'pending'
+    status: 'success',
+    cpu: '4',
+    memory: '4'
+
   },
   {
     name: '192.168.1.8',
-    status: 'error'
+    status: 'success',
+    cpu: '4',
+    memory: '2'
   },
   {
     name: '192.168.1.9',
-    status: 'success'
+    status: 'success',
+    cpu: '2',
+    memory: '4'
   },
   {
     name: '192.168.1.10',
-    status: 'pending'
+    status: 'pending',
+    cpu: '4',
+    memory: '2'
   },
   {
     name: '192.168.1.11',
-    status: 'pending'
+    status: 'success',
+    cpu: '2',
+    memory: '2'
   },
   {
     name: '192.168.1.12',
-    status: 'pending'
+    status: 'pending',
+    cpu: '2',
+    memory: '4'
+  },
+  {
+    name: '192.168.1.13',
+    status: 'success',
+    cpu: '4',
+    memory: '8'
   }
 ]);

+ 39 - 13
ambari-web/app/data/mock/step3_retry_hosts.js

@@ -1,55 +1,81 @@
 module.exports = new Ember.Set([
   {
     name: '192.168.1.1',
-    status: 'error'
+    status: 'error',
+    cpu: '2',
+    memory: '2'
   },
   {
     name: '192.168.1.2',
-    status: 'success'
+    status: 'success',
+    cpu: '4',
+    memory: '4'
   },
   {
     name: '192.168.1.3',
-    status: 'error'
+    status: 'error',
+    cpu: '2',
+    memory: '2'
   },
   {
     name: '192.168.1.4',
-    status: 'success'
+    status: 'success',
+    cpu: '2',
+    memory: '4'
   },
   {
     name: '192.168.1.5',
-    status: 'success'
+    status: 'success',
+    cpu: '2',
+    memory: '4'
   },
   {
     name: '192.168.1.6',
-    status: 'success'
+    status: 'success',
+    cpu: '4',
+    memory: '8'
   },
   {
     name: '192.168.1.7',
-    status: 'success'
+    status: 'success',
+    cpu: '4',
+    memory: '4'
 
   },
   {
     name: '192.168.1.8',
-    status: 'success'
+    status: 'success',
+    cpu: '4',
+    memory: '2'
   },
   {
     name: '192.168.1.9',
-    status: 'success'
+    status: 'success',
+    cpu: '2',
+    memory: '4'
   },
   {
     name: '192.168.1.10',
-    status: 'success'
+    status: 'success',
+    cpu: '4',
+    memory: '2'
   },
   {
     name: '192.168.1.11',
-    status: 'success'
+    status: 'success',
+    cpu: '2',
+    memory: '2'
   },
   {
     name: '192.168.1.12',
-    status: 'success'
+    status: 'success',
+    cpu: '2',
+    memory: '4'
   },
   {
     name: '192.168.1.13',
-    status: 'success'
+    status: 'success',
+    cpu: '4',
+    memory: '8'
   }
 ]);

+ 2 - 0
ambari-web/app/models/service.js

@@ -23,6 +23,8 @@ App.ServiceInfo = Ember.Object.extend({
   elementId: 'service',
   serviceName: '',
   displayName: '',
+  isMaster: '',
+  isClient: '',
   isDisabled: '',
   isHidden: '',
   isSelected: 'true',

+ 7 - 7
ambari-web/app/models/service_config.js

@@ -28,7 +28,7 @@ App.ServiceConfig = Ember.Object.extend({
   configCategories: [],
   configs: null,
 
-  errorCount: function() {
+  errorCount: function () {
     return this.get('configs').filterProperty('isValid', false).get('length');
   }.property('configs.@each.isValid')
 });
@@ -56,16 +56,16 @@ App.ServiceConfigProperty = Ember.Object.extend({
   value: '',
   defaultValue: '',
   description: '',
-  displayType: 'string',  // string, digits, number, directories, custom
+  displayType: 'string', // string, digits, number, directories, custom
   unit: '',
   category: 'General',
-  isRequired: true,  // by default a config property is required
+  isRequired: true, // by default a config property is required
   isReconfigurable: true, // by default a config property is reconfigurable
   isEditable: true, // by default a config property is editable
   errorMessage: '',
   serviceConfig: null, // points to the parent App.ServiceConfig object
 
-  init: function() {
+  init: function () {
     this.set('value', this.get('defaultValue'));
     // TODO: remove mock data
     switch (this.get('name')) {
@@ -120,11 +120,11 @@ App.ServiceConfigProperty = Ember.Object.extend({
     }
   },
 
-  isValid: function() {
+  isValid: function () {
     return this.get('errorMessage') === '';
   }.property('errorMessage'),
 
-  viewClass: function() {
+  viewClass: function () {
     switch (this.get('displayType')) {
       case 'checkbox':
         return App.ServiceConfigCheckbox;
@@ -149,7 +149,7 @@ App.ServiceConfigProperty = Ember.Object.extend({
     }
   }.property('displayType'),
 
-  validate: function() {
+  validate: function () {
 
     var value = this.get('value');
 

+ 1 - 6
ambari-web/app/routes/installer.js

@@ -83,12 +83,7 @@ module.exports = Em.Route.extend({
       router.get('installerController').connectOutlet('installerStep3');
     },
     back: Em.Router.transitionTo('step2'),
-    next: function (router, context) {
-      if (result) {
-        console.log('In step3 transiting to step4');
-        router.transitionTo('step4');
-      }
-    }
+    next: Em.Router.transitionTo('step4')
   }),
 
   step4: Em.Route.extend({

+ 6 - 2
ambari-web/app/templates/installer/step3.hbs

@@ -33,7 +33,11 @@
       </a>
       <a class="btn btn-info"
          href="#" {{action mockBtn target="controller" }}>
-        Mock Data
+        mockData
+      </a>
+      <a class="btn btn-info"
+         href="#" {{action pollBtn target="controller" }}>
+         pollData
       </a>
 
       <div class="dropdown pull-right">
@@ -104,6 +108,6 @@
   </div>
 </div>
 <div class="btn-area">
-  <a class="btn pull-left" {{bindAttr disabled="isSubmitDisabled"}} {{action back}}>&larr; Previous</a>
+  <a class="btn pull-left" {{bindAttr disabled="isSubmitDisabled"}} {{action back}}>&larr; Back</a>
   <a class="btn btn-success pull-right" {{bindAttr disabled="isSubmitDisabled"}} {{action submit target="controller"}}>Next &rarr;</a>
 </div>

+ 2 - 2
ambari-web/app/templates/installer/step5.hbs

@@ -75,6 +75,6 @@
   <div style="clear: both;"></div>
 </div>
 <div class="btn-area">
-  <a class="btn" {{action back}}>Back</a>
-  <a class="btn btn-success" {{action next}}>Next</a>
+  <a class="btn pull-left" {{action back}}>&larr; Back</a>
+  <a class="btn btn-success pull-right" {{action submit target="controller"}}>Next &rarr;</a>
 </div>

+ 7 - 2
ambari-web/app/templates/installer/step6.hbs

@@ -33,24 +33,29 @@
       <th>
         <a href="#" {{bindAttr class="isAllTaskTrackers:selected:deselected"}} {{action selectAllTaskTrackers target="controller"}}>all</a> | <a href="#" {{bindAttr class="isNoTaskTrackers:selected:deselected"}} {{action deselectAllTaskTrackers target="controller"}}>none</a>
       </th>
+      {{#if showHbase}}
       <th>
         <a href="#" {{bindAttr class="isAllRegionServers:selected:deselected"}} {{action selectAllRegionServers target="controller"}}>all</a> | <a href="#" {{bindAttr class="isNoRegionServers:selected:deselected"}} {{action deselectAllRegionServers target="controller"}}>none</a>
       </th>
+      {{/if}}
     </tr>
     </thead>
     <tbody>
+
     {{#each hosts}}
     <tr>
       <td>{{hostname}}</td>
       <td><label class="checkbox">{{view Ember.Checkbox checkedBinding="isDataNode"}}DataNode</label></td>
       <td><label class="checkbox">{{view Ember.Checkbox checkedBinding="isTaskTracker"}}TaskTracker</label></td>
+      {{#if controller.showHbase}}
       <td><label class="checkbox">{{view Ember.Checkbox checkedBinding="isRegionServer"}}RegionServer</label></td>
+      {{/if}}
     </tr>
     {{/each}}
     </tbody>
   </table>
   <div class="btn-area">
-    <a class="btn" {{action back}}>Back</a>
-    <a class="btn btn-success" style="float:right" {{action submit target="controller"}}>Next</a>
+    <a class="btn" {{action back}}>&larr; Back</a>
+    <a class="btn btn-success" style="float:right" {{action submit target="controller"}}>Next &rarr;</a>
   </div>
 </div>

+ 50 - 41
ambari-web/app/templates/installer/step7.hbs

@@ -15,58 +15,67 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 -->
+
 <div id="serviceConfig">
-<h2>{{t installer.step7.header}}</h2>
-<div class="alert alert-info">
-  {{t installer.step7.body}}
-</div>
-{{#view App.ServiceConfigTabs}}
-<ul class="nav nav-tabs">
-{{#each service in controller}}
-    <li><a class="active" {{bindAttr href="service.serviceName"}} data-toggle="tab" {{action selectService service on="click" target="view"}}>{{service.displayName}}{{#if service.errorCount}}<span class="badge badge-important">{{service.errorCount}}</span>{{/if}}</a></li>
-{{/each}}
-</ul>
-{{/view}}
-<div class="accordion">
+  <h2>{{t installer.step7.header}}</h2>
+
+  <div class="alert alert-info">
+    {{t installer.step7.body}}
+  </div>
+  {{#view App.ServiceConfigTabs}}
+  <ul class="nav nav-tabs">
+    {{#each service in controller}}
+    <li><a class="active" {{bindAttr href="service.serviceName"}}
+           data-toggle="tab" {{action selectService service on="click" target="view"}}>{{service.displayName}}{{#if service.errorCount}}<span
+      class="badge badge-important">{{service.errorCount}}</span>{{/if}}</a>
+    </li>
+    {{/each}}
+  </ul>
+  {{/view}}
+  <div class="accordion">
     {{#each category in selectedService.configCategories}}
     <div class="accordion-group">
-        <div class="accordion-heading">
-            <a class="accordion-toggle">
-                {{category.name}}
-            </a>
-        </div>
-        {{#view App.ServiceConfigsByCategoryView categoryBinding="category" serviceConfigsBinding="selectedService.configs"}}
-        <div class="accordion-body collapse in">
-            <div class="accordion-inner">
-                <form class="form-horizontal">
-                    {{#each view.categoryConfigs}}
-                        <div {{bindAttr class="errorMessage:error: :control-group"}}>
-                            <label class="control-label">{{displayName}}</label>
-                            <div class="controls">
-                                {{view viewClass serviceConfigBinding="this"}}
-                                <span class="help-inline">{{errorMessage}}</span>
-                            </div>
-                        </div>
-                    {{/each}}
-                </form>
+      <div class="accordion-heading">
+        <a class="accordion-toggle">
+          {{category.name}}
+        </a>
+      </div>
+      {{#view App.ServiceConfigsByCategoryView categoryBinding="category" serviceConfigsBinding="selectedService.configs"}}
+      <div class="accordion-body collapse in">
+        <div class="accordion-inner">
+          <form class="form-horizontal">
+            {{#each view.categoryConfigs}}
+            <div {{bindAttr class="errorMessage:error: :control-group"}}>
+              <label class="control-label">{{displayName}}</label>
+
+              <div class="controls">
+                {{view viewClass serviceConfigBinding="this"}}
+                <span class="help-inline">{{errorMessage}}</span>
+              </div>
             </div>
+            {{/each}}
+          </form>
         </div>
-        {{/view}}
+      </div>
+      {{/view}}
     </div>
     {{#if category.isForSlaveComponent}}
     {{#view App.AddSlaveComponentGroupButton slaveComponentNameBinding="category.name"}}
-    <a class="btn add-slave-component-group" {{action showAddSlaveComponentGroup category.name target="App.router.slaveComponentGroupsController"}}><i class="icon-plus-sign"></i> Add a {{category.name}} Group</a>
+    <a
+      class="btn add-slave-component-group" {{action showAddSlaveComponentGroup category.name target="App.router.slaveComponentGroupsController"}}><i
+      class="icon-plus-sign"></i> Add a {{category.name}} Group</a>
     {{/view}}
     {{/if}}
     {{/each}}
-</div>
-{{#if isSubmitDisabled}}
-<div class="alert">{{t installer.step7.attentionNeeded}}</div>
-{{/if}}
-<div class="btn-area">
-    <a class="btn" {{action back}}>Back</a>
+  </div>
+  {{#if isSubmitDisabled}}
+  <div class="alert">{{t installer.step7.attentionNeeded}}</div>
+  {{/if}}
+  <div class="btn-area">
+    <a class="btn" {{action back}}>&larr; Back</a>
+
     <div style="float:right">
-      <a {{bindAttr class=":btn :btn-success"}} {{bindAttr disabled="isSubmitDisabled"}} {{action submit target="controller"}}>Next</a>
+      <a {{bindAttr class=":btn :btn-success"}} {{bindAttr disabled="isSubmitDisabled"}} {{action submit target="controller"}}>Next &rarr;</a>
     </div>
-</div>
+  </div>
 </div>

+ 3 - 3
ambari-web/app/templates/installer/step8.hbs

@@ -18,6 +18,6 @@
 
 <h2>{{t installer.step8.header}}</h2>
 <div class="btn-area">
-    <a class="btn" {{action back}}>Back</a>
-    <a class="btn btn-success" {{action next}}>Next</a>
-</div>
+  <a class="btn pull-left" {{action back}}>&larr; Back</a>
+  <a class="btn btn-success pull-right" {{action next}}>Next &rarr;</a>
+</div>

+ 18 - 0
ambari-web/app/utils/db.js

@@ -67,6 +67,8 @@ if(localStorage.getObject('ambari') == null) {
  * setter methods
  */
 
+
+
 App.db.setLoginName = function(name) {
   console.log('TRACE: Entering db:setLoginName function');
   App.db.data = localStorage.getObject('ambari');
@@ -183,6 +185,7 @@ App.db.setMasterComponentHosts = function(masterComponentHosts) {
   localStorage.setObject('ambari', App.db.data);
 }
 
+
 App.db.setHostSlaveComponents = function(hostSlaveComponents) {
   App.db.data = localStorage.getObject('ambari');
   var user = App.db.data.app.loginName;
@@ -197,6 +200,15 @@ App.db.setSlaveComponentHosts = function(slaveComponentHosts) {
   localStorage.setObject('ambari', App.db.data);
 }
 
+App.db.setServiceConfigProperties = function(configProperties) {
+  App.db.data = localStorage.getObject('ambari');
+  var user = App.db.data.app.loginName;
+  App.db.data[user].Installer.configProperties = configProperties;
+  localStorage.setObject('ambari', App.db.data);
+}
+
+
+
 /*
  *  getter methods
  */
@@ -283,4 +295,10 @@ App.db.getSlaveComponentHosts = function() {
   return App.db.data[user].Installer.slaveComponentHosts;
 }
 
+App.db.setServiceConfigProperties = function() {
+  App.db.data = localStorage.getObject('ambari');
+  var user = App.db.data.app.loginName;
+  return App.db.data[user].Installer.configProperties;
+}
+
 module.exports = App.db;

+ 0 - 1
ambari-web/app/views/installer/step3_view.js

@@ -25,7 +25,6 @@ App.InstallerStep3View = Em.View.extend({
   category: '',
 
   didInsertElement: function () {
-    $("[rel=popover]").popover({'placement': 'right', 'trigger': 'hover'});
     var controller = this.get('controller');
     var hosts = controller.loadHosts();
     controller.renderHosts(hosts);

+ 6 - 5
ambari-web/app/views/installer/step5_view.js

@@ -23,8 +23,9 @@ App.InstallerStep5View = Em.View.extend({
 
   templateName: require('templates/installer/step5'),
 
-  submit: function (e) {
-    App.router.transitionTo('step6');
+  didInsertElement: function () {
+    var controller = this.get('controller');
+    controller.loadStep();
   }
 
 });
@@ -36,7 +37,7 @@ App.SelectHostView = Em.Select.extend({
   serviceName: null,
 
   change: function () {
-    App.router.get('installerStep5Controller').assignHostToMaster(this.get("serviceName"), this.get("value"), this.get("zId"));
+    this.get('controller').assignHostToMaster(this.get("serviceName"), this.get("value"), this.get("zId"));
   },
 
   didInsertElement: function () {
@@ -51,7 +52,7 @@ App.AddControlView = Em.View.extend({
   template: Ember.Handlebars.compile('+'),
 
   click: function (event) {
-    App.router.get('installerStep5Controller').addZookeepers();
+    this.get('controller').addZookeepers();
   }
 });
 
@@ -62,6 +63,6 @@ App.RemoveControlView = Em.View.extend({
   template: Ember.Handlebars.compile('-'),
 
   click: function (event) {
-    App.router.get('installerStep5Controller').removeZookeepers(this.get("zId"));
+    this.get('controller').removeZookeepers(this.get("zId"));
   }
 });

+ 6 - 1
ambari-web/app/views/installer/step6_view.js

@@ -21,6 +21,11 @@ var App = require('app');
 
 App.InstallerStep6View = Em.View.extend({
 
-  templateName: require('templates/installer/step6')
+  templateName: require('templates/installer/step6'),
+
+  didInsertElement: function () {
+    var controller = this.get('controller');
+    controller.loadStep();
+  }
 
 });

+ 14 - 15
ambari-web/app/views/installer/step7_view.js

@@ -30,28 +30,27 @@ App.ServiceConfigsByCategoryView = Ember.View.extend({
   content: null,
 
   category: null,
-  serviceConfigs: null,  // General, Advanced, NameNode, SNameNode, DataNode, etc.
+  serviceConfigs: null, // General, Advanced, NameNode, SNameNode, DataNode, etc.
 
-  categoryConfigs: function() {
+  categoryConfigs: function () {
     return this.get('serviceConfigs').filterProperty('category', this.get('category.name'))
   }.property('serviceConfigs.@each').cacheable()
 });
 
 App.ServiceConfigTabs = Ember.View.extend({
 
-  selectService: function(event) {
+  selectService: function (event) {
     this.set('controller.selectedService', event.context);
   },
 
-  didInsertElement: function() {
+  didInsertElement: function () {
     var serviceName = this.get('controller.selectedService').serviceName;
     this.$('a[href="' + serviceName + '"]').tab('show');
   }
-
 });
 
 App.ServiceConfigPopoverSupport = Ember.Mixin.create({
-  didInsertElement: function() {
+  didInsertElement: function () {
     if (this.get('isPopoverEnabled') !== 'false') {
       this.$().popover({
         title: this.get('serviceConfig.displayName') + '<br><small>' + this.get('serviceConfig.name') + '</small>',
@@ -70,16 +69,16 @@ App.ServiceConfigTextField = Ember.TextField.extend(App.ServiceConfigPopoverSupp
   valueBinding: 'serviceConfig.value',
   classNameBindings: 'textFieldClassName',
 
-  textFieldClassName: function() {
+  textFieldClassName: function () {
     // sets the width of the field depending on display type
-    if (['directory','url','email','user','host'].contains(this.get('serviceConfig.displayType'))) {
+    if (['directory', 'url', 'email', 'user', 'host'].contains(this.get('serviceConfig.displayType'))) {
       return ['span6'];
     } else {
       return ['input-small'];
     }
   }.property('serviceConfig.displayType'),
 
-  disabled: function() {
+  disabled: function () {
     return !this.get('serviceConfig.isEditable');
   }.property('serviceConfig.isEditable')
 
@@ -92,7 +91,7 @@ App.ServiceConfigTextFieldWithUnit = Ember.View.extend(App.ServiceConfigPopoverS
 
   template: Ember.Handlebars.compile('{{view App.ServiceConfigTextField serviceConfigBinding="view.serviceConfig" isPopoverEnabled="false"}}<span class="add-on">{{view.serviceConfig.unit}}</span>'),
 
-  disabled: function() {
+  disabled: function () {
     return !this.get('serviceConfig.isEditable');
   }.property('serviceConfig.isEditable')
 
@@ -136,7 +135,7 @@ App.ServiceConfigCheckbox = Ember.Checkbox.extend(App.ServiceConfigPopoverSuppor
 });
 
 App.ServiceConfigHostPopoverSupport = Ember.Mixin.create({
-  didInsertElement: function() {
+  didInsertElement: function () {
     this.$().popover({
       title: this.get('serviceConfig.displayName'),
       content: this.get('serviceConfig.description'),
@@ -158,19 +157,19 @@ App.ServiceConfigMasterHostView = Ember.View.extend(App.ServiceConfigHostPopover
 
 App.ServiceConfigMultipleHostsDisplay = Ember.Mixin.create(App.ServiceConfigHostPopoverSupport, {
 
-  hasNoHosts: function() {
+  hasNoHosts: function () {
     return this.get('value').length === 0;
   }.property('value'),
 
-  hasOneHost: function() {
+  hasOneHost: function () {
     return this.get('value').length === 1;
   }.property('value'),
 
-  hasMultipleHosts: function() {
+  hasMultipleHosts: function () {
     return this.get('value').length > 1;
   }.property('value'),
 
-  otherLength: function() {
+  otherLength: function () {
     var len = this.get('value').length;
     if (len > 2) {
       return (len - 1) + ' others';