incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject svn commit: r1403142 - in /incubator/ambari/branches/AMBARI-666: ./ ambari-web/app/ ambari-web/app/controllers/ ambari-web/app/controllers/installer/ ambari-web/app/controllers/main/host/ ambari-web/app/controllers/wizard/ ambari-web/app/models/ ambari...
Date Mon, 29 Oct 2012 01:24:12 GMT
Author: yusaku
Date: Mon Oct 29 01:24:10 2012
New Revision: 1403142

URL: http://svn.apache.org/viewvc?rev=1403142&view=rev
Log:
AMBARI-941. More refactoring of Wizards in Ambari Web. (yusaku)

Added:
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step10_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step10.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/base64.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step10_view.js
Removed:
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step10_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step1_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step4_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step5_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step6_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step1.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step10.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step4.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step5.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step6.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step10_view.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step1_view.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step4_view.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step5_view.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step6_view.js
Modified:
    incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/add_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/details.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step5_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step6_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/add_host_routes.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hbase.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hive.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/oozie.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/zookeeper.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/summary.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/menu_item.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step1.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step6.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/menu.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/menu.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/menu.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/menu.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/menu.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step5_view.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step6_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=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt (original)
+++ incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt Mon Oct 29 01:24:10 2012
@@ -362,6 +362,8 @@ AMBARI-666 branch (unreleased changes)
 
   IMPROVEMENTS
 
+  AMBARI-941. More refactoring of Wizards in Ambari Web. (yusaku)
+
   AMBARI-919. Partial refactoring and consolidation of code for various
   wizards. (yusaku)
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js Mon Oct 29 01:24:10 2012
@@ -22,14 +22,8 @@
 require('controllers/application');
 require('controllers/login_controller');
 require('controllers/installer');
-require('controllers/installer/step1_controller');
 require('controllers/installer/step2_controller');
 require('controllers/installer/step3_controller');
-require('controllers/installer/step4_controller');
-require('controllers/installer/step6_controller');
-require('controllers/installer/step5_controller');
-require('controllers/installer/step6_controller');
-require('controllers/installer/step10_controller');
 require('controllers/main');
 require('controllers/main/admin');
 require('controllers/main/admin/item');
@@ -64,4 +58,5 @@ require('controllers/wizard/step5_contro
 require('controllers/wizard/step6_controller');
 require('controllers/wizard/step7_controller');
 require('controllers/wizard/step8_controller');
-require('controllers/wizard/step9_controller');
\ No newline at end of file
+require('controllers/wizard/step9_controller');
+require('controllers/wizard/step10_controller');
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer.js?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer.js Mon Oct 29 01:24:10 2012
@@ -203,24 +203,26 @@ App.InstallerController = Em.Controller.
   },
 
   content: Em.Object.create({
-    cluster: {},
-    hosts: {},
-    services: {},
-    hostsInfo: {},
-    slaveComponentHosts: {},
-    hostSlaveComponents: {},
-    masterComponentHosts: {},
-    serviceConfigProperties: {}
+    cluster: null,
+    hosts: null,
+    services: null,
+    hostsInfo: null,
+    slaveComponentHosts: null,
+    hostSlaveComponents: null,
+    masterComponentHosts: null,
+    hostToMasterComponent : null,
+    serviceConfigProperties: null
   }),
 
   /**
    * Load clusterInfo(step1) to model
    */
   loadClusterInfo: function () {
+    var cStatus = App.db.getClusterStatus() || {status: "", isCompleted: false};
     var cluster = {
-      name: App.db.getClusterName(),
-      status: App.db.getClusterStatus().status,
-      isCompleted: App.db.getClusterStatus().isCompleted
+      name: App.db.getClusterName() || "",
+      status: cStatus.status,
+      isCompleted: cStatus.isCompleted
     };
     this.set('content.cluster', cluster);
 
@@ -470,6 +472,19 @@ App.InstallerController = Em.Controller.
     console.log("installerController.saveComponentHosts: saved hosts ", masterComponentHosts);
     App.db.setMasterComponentHosts(masterComponentHosts);
     this.set('content.masterComponentHosts', masterComponentHosts);
+
+    var hosts = masterComponentHosts.mapProperty('hostName').uniq();
+    var hostsMasterServicesMapping = [];
+    hosts.forEach(function (_host) {
+      var componentsOnHost = masterComponentHosts.filterProperty('hostName', _host).mapProperty('component');
+      hostsMasterServicesMapping.push({
+        hostname: _host,
+        components: componentsOnHost
+      });
+    }, this);
+    console.log("installerController.setHostToMasterComponent: saved hosts ", hostsMasterServicesMapping);
+    App.db.setHostToMasterComponent(hostsMasterServicesMapping);
+    this.set('content.hostToMasterComponent', hostsMasterServicesMapping);
   },
 
   /**
@@ -479,6 +494,10 @@ App.InstallerController = Em.Controller.
     var masterComponentHosts = App.db.getMasterComponentHosts();
     this.set("content.masterComponentHosts", masterComponentHosts);
     console.log("InstallerController.loadMasterComponentHosts: loaded hosts ", masterComponentHosts);
+
+    var hostsMasterServicesMapping = App.db.getHostToMasterComponent();
+    this.set("content.hostToMasterComponent", hostsMasterServicesMapping);
+    console.log("InstallerController.loadHostToMasterComponent: loaded hosts ", hostsMasterServicesMapping);
   },
 
   /**
@@ -497,6 +516,7 @@ App.InstallerController = Em.Controller.
     var dataNodeHosts = [];
     var taskTrackerHosts = [];
     var regionServerHosts = [];
+    var clientHosts = [];
 
     hosts.forEach(function (host) {
       if (host.get('isDataNode')) {
@@ -517,6 +537,12 @@ App.InstallerController = Em.Controller.
           group: 'Default'
         });
       }
+      if (host.get('isClient')) {
+        clientHosts.pushObject({
+          hostname: host.hostname,
+          group: 'Default'
+        });
+      }
     }, this);
 
     var slaveComponentHosts = [];
@@ -539,6 +565,11 @@ App.InstallerController = Em.Controller.
         hosts: regionServerHosts
       });
     }
+    slaveComponentHosts.pushObject({
+      componentName: 'CLIENT',
+      displayName: 'client',
+      hosts: clientHosts
+    });
 
     App.db.setSlaveComponentHosts(slaveComponentHosts);
     this.set('content.slaveComponentHosts', slaveComponentHosts);
@@ -558,7 +589,7 @@ App.InstallerController = Em.Controller.
   },
 
   /**
-   * TODO:
+   * Save config properties
    * @param stepController Step7WizardController
    */
   saveServiceConfigProperties: function (stepController) {
@@ -588,6 +619,47 @@ App.InstallerController = Em.Controller.
   },
 
   /**
+   * Load information about hosts with clients components
+   */
+  loadClients: function(){
+    var clients = App.db.getClientsForSelectedServices();
+    this.set('content.clients', clients);
+    console.log("InstallerController.loadClients: loaded list ", clients);
+  },
+
+  /**
+   * Generate clients list for selected services and save it to model
+   * @param stepController step4WizardController
+   */
+  saveClients: function(stepController){
+    var clients = [];
+    var serviceComponents = require('data/service_components');
+
+    stepController.get('content').filterProperty('isSelected',true).forEach(function (_service) {
+      var client = serviceComponents.filterProperty('service_name', _service.serviceName).findProperty('isClient', true);
+      if (client) {
+        clients.pushObject({
+          component_name: client.component_name,
+          display_name: client.display_name
+        });
+      }
+    }, this);
+
+    App.db.setClientsForSelectedServices(clients);
+    this.set('content.clients', clients);
+    console.log("InstallerController.saveClients: saved list ", clients);
+  },
+
+  /**
+   * Load HostToMasterComponent array
+   */
+  loadHostToMasterComponent: function(){
+    var list = App.db.getHostToMasterComponent();
+    this.set('content.hostToMasterComponent', list);
+    console.log("AddHostController.loadHostToMasterComponent: loaded list ", list);
+  },
+
+  /**
    * List of statuses, what data is currently loaded
    */
   isStepLoaded: {},
@@ -612,12 +684,14 @@ App.InstallerController = Em.Controller.
           //need to call it every time since we preload data in setInfoForStep9
         this.loadClusterInfo();
       case '8':
-        this.callLoadFuncOnce('loadClusterInfo');
+        this.loadClusterInfo();
       case '7':
         this.callLoadFuncOnce('loadServiceConfigProperties');
       case '6':
         this.callLoadFuncOnce('loadMasterComponentHosts');
         this.callLoadFuncOnce('loadSlaveComponentHosts');
+        this.callLoadFuncOnce('loadClients');
+        this.callLoadFuncOnce('loadHostToMasterComponent');
       case '5':
         this.callLoadFuncOnce('loadConfirmedHosts');
       case '4':

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login_controller.js?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login_controller.js Mon Oct 29 01:24:10 2012
@@ -20,47 +20,24 @@ var App = require('app');
 
 App.LoginController = Em.Object.extend({
 
-  name:'loginController',
-  loginName:'',
-  password:'',
-  errorMessage:'',
+  name: 'loginController',
+  loginName: '',
+  password: '',
+  errorMessage: '',
 
   submit: function (e) {
-    console.log('Login: ' + this.get('loginName') + ' Password: ' + this.get('password'));
+    // console.log('Login: ' + this.get('loginName') + ' Password: ' + this.get('password'));
 
     this.set('errorMessage', '');
 
-    var user = this.validateCredentials();
-   
-    if (user) {
-      App.get('router').login(this.get('loginName'), user);
-    } else {
-      console.log('Failed to login as: ' + this.get('loginName'));
-      this.set('errorMessage', Em.I18n.t('login.error'));
-    }
-  },
-
-  /**
-   *
-   * @return {number} user by credentials || {undefined}
-   */
-  validateCredentials: function () {
-    //TODO: REST api that validates the login
-    var thisController = this;
-    var auth = App.get('router').authenticated();
-    console.log(auth);
-//    if (auth) {
-      var user = App.store.filter(App.User, function (data) {
-        return data.get('user_name') == thisController.get('loginName') && data.get('password') == thisController.get('password');
-      });
-
-      var clientId = user.content[0];
-      if (user.content[0] !== undefined) {
-        return App.store.findByClientId(App.User, clientId);
-      } else {
-        return undefined;
+    var self = this;
+
+    var user = App.get('router').mockLogin(function (isAuthenticated) {
+      if (!isAuthenticated) {
+        console.log('Failed to login as: ' + self.get('loginName'));
+        self.set('errorMessage', Em.I18n.t('login.error'));
       }
-//    }
+    });
   }
 
 });
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/add_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/add_controller.js?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/add_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/add_controller.js Mon Oct 29 01:24:10 2012
@@ -35,14 +35,15 @@ App.AddHostController = Em.Controller.ex
    * config??? - to be described later
    */
   content: Em.Object.create({
-    cluster: {},
-    hosts: {},
-    services: {},
-    hostsInfo: {},
-    slaveComponentHosts: {},
-    hostSlaveComponents: {},
-    masterComponentHosts: {},
-    serviceConfigProperties: {}
+    cluster: null,
+    hosts: null,
+    services: null,
+    hostsInfo: null,
+    slaveComponentHosts: null,
+    hostSlaveComponents: null,
+    masterComponentHosts: null,
+    hostToMasterComponent : null,
+    serviceConfigProperties: null
   }),
 
   /**
@@ -193,10 +194,11 @@ App.AddHostController = Em.Controller.ex
    * Load clusterInfo(step1) to model
    */
   loadClusterInfo: function(){
+    var cStatus = App.db.getClusterStatus() || {status: "", isCompleted: false};
     var cluster = {
-      name: App.db.getClusterName(),
-      status: App.db.getClusterStatus().status,
-      isCompleted: App.db.getClusterStatus().isCompleted
+      name: App.db.getClusterName() || "",
+      status: cStatus.status,
+      isCompleted: cStatus.isCompleted
     };
     this.set('content.cluster', cluster);
     console.log("AddHostController:loadClusterInfo: loaded data ", cluster);
@@ -444,6 +446,19 @@ App.AddHostController = Em.Controller.ex
     console.log("AddHostController.saveComponentHosts: saved hosts ", masterComponentHosts);
     App.db.setMasterComponentHosts(masterComponentHosts);
     this.set('content.masterComponentHosts', masterComponentHosts);
+
+    var hosts = masterComponentHosts.mapProperty('hostName').uniq();
+    var hostsMasterServicesMapping = [];
+    hosts.forEach(function (_host) {
+      var componentsOnHost = masterComponentHosts.filterProperty('hostName', _host).mapProperty('component');
+      hostsMasterServicesMapping.push({
+        hostname: _host,
+        components: componentsOnHost
+      });
+    }, this);
+    console.log("AddHostController.setHostToMasterComponent: saved hosts ", hostsMasterServicesMapping);
+    App.db.setHostToMasterComponent(hostsMasterServicesMapping);
+    this.set('content.hostToMasterComponent', hostsMasterServicesMapping);
   },
 
   /**
@@ -453,6 +468,10 @@ App.AddHostController = Em.Controller.ex
     var masterComponentHosts = App.db.getMasterComponentHosts();
     this.set("content.masterComponentHosts", masterComponentHosts);
     console.log("AddHostController.loadMasterComponentHosts: loaded hosts ", masterComponentHosts);
+
+    var hostsMasterServicesMapping = App.db.getHostToMasterComponent();
+    this.set("content.hostToMasterComponent", hostsMasterServicesMapping);
+    console.log("AddHostController.loadHostToMasterComponent: loaded hosts ", hostsMasterServicesMapping);
   },
 
   /**
@@ -471,6 +490,7 @@ App.AddHostController = Em.Controller.ex
     var dataNodeHosts = [];
     var taskTrackerHosts = [];
     var regionServerHosts = [];
+    var clientHosts = [];
 
     hosts.forEach(function (host) {
       if (host.get('isDataNode')) {
@@ -491,6 +511,12 @@ App.AddHostController = Em.Controller.ex
           group: 'Default'
         });
       }
+      if (host.get('isClient')) {
+        clientHosts.pushObject({
+          hostname: host.hostname,
+          group: 'Default'
+        });
+      }
     }, this);
 
     var slaveComponentHosts = [];
@@ -513,6 +539,11 @@ App.AddHostController = Em.Controller.ex
         hosts: regionServerHosts
       });
     }
+    slaveComponentHosts.pushObject({
+      componentName: 'CLIENT',
+      displayName: 'client',
+      hosts: clientHosts
+    });
 
     App.db.setSlaveComponentHosts(slaveComponentHosts);
     this.set('content.slaveComponentHosts', slaveComponentHosts);
@@ -532,7 +563,7 @@ App.AddHostController = Em.Controller.ex
   },
 
   /**
-   * TODO:
+   * Save config properties
    * @param stepController Step7WizardController
    */
   saveServiceConfigProperties: function (stepController) {
@@ -562,6 +593,48 @@ App.AddHostController = Em.Controller.ex
   },
 
   /**
+   * Load information about hosts with clients components
+   */
+  loadClients: function(){
+    var clients = App.db.getClientsForSelectedServices();
+    this.set('content.clients', clients);
+    console.log("AddHostController.loadClients: loaded list ", clients);
+  },
+
+  /**
+   * Generate clients list for selected services and save it to model
+   * @param stepController step4WizardController
+   */
+  saveClients: function(stepController){
+    var clients = [];
+    var serviceComponents = require('data/service_components');
+
+    stepController.get('content').filterProperty('isSelected',true).forEach(function (_service) {
+      var client = serviceComponents.filterProperty('service_name', _service.serviceName).findProperty('isClient', true);
+      if (client) {
+        clients.pushObject({
+          component_name: client.component_name,
+          display_name: client.display_name
+        });
+      }
+    }, this);
+
+    App.db.setClientsForSelectedServices(clients);
+    this.set('content.clients', clients);
+    console.log("AddHostController.saveClients: saved list ", clients);
+  },
+
+  /**
+   * Load HostToMasterComponent array
+   */
+  loadHostToMasterComponent: function(){
+    var list = App.db.getHostToMasterComponent();
+    this.set('content.hostToMasterComponent', list);
+    console.log("AddHostController.loadHostToMasterComponent: loaded list ", list);
+  },
+
+
+  /**
    * Call specified function only once
    */
   callLoadFuncOnce: function (name) {
@@ -581,12 +654,14 @@ App.AddHostController = Em.Controller.ex
           //need to call it every time since we preload data in setInfoForStep9
         this.loadClusterInfo();
       case '7':
-        this.callLoadFuncOnce('loadClusterInfo');
+        this.loadClusterInfo();
       case '6':
         this.callLoadFuncOnce('loadServiceConfigProperties');
       case '5':
         this.callLoadFuncOnce('loadMasterComponentHosts');
         this.callLoadFuncOnce('loadSlaveComponentHosts');
+        this.callLoadFuncOnce('loadClients');
+        this.callLoadFuncOnce('loadHostToMasterComponent');
       case '4':
         this.callLoadFuncOnce('loadConfirmedHosts');
       case '3':
@@ -605,6 +680,7 @@ App.AddHostController = Em.Controller.ex
    */
   clearAllSteps: function () {
     this.clearHosts();
+    //todo it)
   }
 
 });

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/details.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/details.js?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/details.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/details.js Mon Oct 29 01:24:10 2012
@@ -27,11 +27,40 @@ App.MainHostDetailsController = Em.Contr
   isStopping: function(){
     return !this.get('isStarting');
   }.property('isStarting'),
+  intervalId: false,
+  checkOperationsInterval: 5000,
+  init: function(){
+    this._super();
+    this.startCheckOperationsLifeTime();
+  },
 
   setBack: function(isFromHosts){
     this.set('isFromHosts', isFromHosts);
   },
 
+  startCheckOperationsLifeTime: function() {
+    this.intervalId = setInterval(this.checkOperationsLifeTime, this.get('checkOperationsInterval'));
+  },
+  stopCheckOperationsLifeTime:function () {
+    if(this.intervalId) {
+      clearInterval(this.intervalId);
+    }
+    this.intervalId = false;
+  },
+
+  checkOperationsLifeTime: function(){
+    var self = App.router.get('mainHostDetailsController');
+    var backgroundOperations = self.get('backgroundOperations');
+    var time = new Date().getTime();
+    if(backgroundOperations.length){
+      backgroundOperations.forEach(function(operation){
+        if (time - operation.time >= 60*1000){
+          backgroundOperations.removeObject(operation);
+        }
+      })
+    }
+  },
+
   hostOperations: function(){
     var hostName = this.get('content.hostName');
     return this.get('backgroundOperations').filterProperty('hostName', hostName);
@@ -72,12 +101,14 @@ App.MainHostDetailsController = Em.Contr
           "hostName": self.get('content.hostName'),
           "role":component.get('componentName'),
           "command": "START",
+          "time": new Date().getTime(),
           "details": [
             {"startTime":"4 min ago", "name":"Some intermediate operation"},
             {"startTime":"5 min ago", "name":"Component started"}
           ],
           "logs":{"exitcode":"404", "stdout":27, "stderror":501}
         });
+        self.showBackgroundOperationsPopup();
         var stopped = self.get('content.components').filterProperty('workStatus', false);
         if (stopped.length == 0)
           self.set('isStarting', true);
@@ -103,12 +134,14 @@ App.MainHostDetailsController = Em.Contr
           "hostName": self.get('content.hostName'),
           "role": component.get('componentName'),
           "command": "STOP",
+          "time": new Date().getTime(),
           "details": [
             {"startTime":"4 min ago", "name":"Some intermediate operation"},
             {"startTime":"5 min ago", "name":"Component stopped"}
           ],
           "logs":{"exitcode":"404", "stdout":15, "stderror":501}
         });
+        self.showBackgroundOperationsPopup();
         var started = self.get('content.components').filterProperty('workStatus', true);
         if (started.length == 0)
           self.set('isStarting', false);
@@ -121,12 +154,28 @@ App.MainHostDetailsController = Em.Contr
   },
 
   decommission: function(event){
+    var self = this;
     App.ModalPopup.show({
       header: Em.I18n.t('hosts.host.start.popup.header'),
       body: Em.I18n.t('hosts.host.start.popup.body'),
       primary: 'Yes',
       secondary: 'No',
       onPrimary: function() {
+        var component = event.context;
+        component.set('decommissioned', true);
+        var backgroundOperations = self.get('backgroundOperations');
+        backgroundOperations.pushObject({
+          "hostName": self.get('content.hostName'),
+          "role":component.get('componentName'),
+          "command": "DECOMMISSION",
+          "time": new Date().getTime(),
+          "details": [
+            {"startTime":"4 min ago", "name":"Some intermediate operation"},
+            {"startTime":"5 min ago", "name":"Component decommissioned"}
+          ],
+          "logs":{"exitcode":"404", "stdout":27, "stderror":501}
+        });
+        self.showBackgroundOperationsPopup();
         this.hide();
       },
       onSecondary: function() {
@@ -136,12 +185,28 @@ App.MainHostDetailsController = Em.Contr
   },
 
   recommission: function(event){
+    var self = this;
     App.ModalPopup.show({
       header: Em.I18n.t('hosts.host.start.popup.header'),
       body: Em.I18n.t('hosts.host.start.popup.body'),
       primary: 'Yes',
       secondary: 'No',
       onPrimary: function() {
+        var component = event.context;
+        component.set('decommissioned', false);
+        var backgroundOperations = self.get('backgroundOperations');
+        backgroundOperations.pushObject({
+          "hostName": self.get('content.hostName'),
+          "role":component.get('componentName'),
+          "command": "RECOMMISSION",
+          "time": new Date().getTime(),
+          "details": [
+            {"startTime":"4 min ago", "name":"Some intermediate operation"},
+            {"startTime":"5 min ago", "name":"Component recommissioned"}
+          ],
+          "logs":{"exitcode":"404", "stdout":27, "stderror":501}
+        });
+        self.showBackgroundOperationsPopup();
         this.hide();
       },
       onSecondary: function() {
@@ -193,7 +258,8 @@ App.MainHostDetailsController = Em.Contr
     components.forEach(function(cInstance){
       var cName = cInstance.get('componentName');
       if(slaveComponents.contains(cName)) {
-        if(cInstance.get('workStatus')){
+        if(cInstance.get('workStatus') &&
+          !cInstance.get('decommissioned')){
           workingComponents.push(cName);
         }
       } else {

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step10_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step10_controller.js?rev=1403142&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step10_controller.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step10_controller.js Mon Oct 29 01:24:10 2012
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var App = require('app');
+
+App.WizardStep10Controller = Em.ArrayController.extend({
+  name: 'wizardStep10Controller',
+  content: [],
+
+  clearStep: function() {
+    this.clear();
+  },
+
+  loadStep: function() {
+    console.log("TRACE: Loading step10: Summary Page");
+    this.clearStep();
+
+  },
+
+  navigateStep: function() {
+    this.loadStep();
+  }
+});
+

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step5_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step5_controller.js?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step5_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step5_controller.js Mon Oct 29 01:24:10 2012
@@ -38,7 +38,7 @@ App.WizardStep5Controller = Em.Controlle
   },
 
   loadStep: function () {
-    console.log("TRACE: Loading step5: Assign Masters");
+    console.log("WizardStep5Controller: Loading step5: Assign Masters");
     this.clearStep();
     this.renderHostInfo();
     this.renderComponents(this.loadComponents());
@@ -80,7 +80,7 @@ App.WizardStep5Controller = Em.Controlle
       this.get("selectedServices").pushObject(Ember.Object.create({service_name: item}));
     }, this);
 
-    var masterHosts = this.get('content.masterHosts');
+    var masterHosts = this.get('content.masterComponentHosts');
 
     var components = new Ember.Set();
     if (!masterHosts) {
@@ -421,8 +421,11 @@ App.WizardStep5Controller = Em.Controlle
 
   lastZooKeeper: function () {
     var currentZooKeepers = this.get("selectedServicesMasters").filterProperty("component_name", "ZooKeeper");
-    var lastZooKeeper = currentZooKeepers.get("lastObject");
-    return lastZooKeeper;
+    if(currentZooKeepers){
+      return currentZooKeepers.get("lastObject");
+    }
+
+    return null;
   },
 
   addZookeepers: function () {

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step6_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step6_controller.js?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step6_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step6_controller.js Mon Oct 29 01:24:10 2012
@@ -35,9 +35,6 @@ var db = require('utils/db');
 App.WizardStep6Controller = Em.Controller.extend({
 
   hosts: [],
-  // TODO: hook up with user host selection
-  rawHosts: [],
-  masterComponentHosts: require('data/mock/master_component_hosts'),
 
   isAllDataNodes: function () {
     return this.get('hosts').everyProperty('isDataNode', true);
@@ -51,6 +48,10 @@ App.WizardStep6Controller = Em.Controlle
     return this.get('hosts').everyProperty('isRegionServer', true);
   }.property('hosts.@each.isRegionServer'),
 
+  isAllClients: function () {
+    return this.get('hosts').everyProperty('isClient', true);
+  }.property('hosts.@each.isClient'),
+
   isNoDataNodes: function () {
     return this.get('hosts').everyProperty('isDataNode', false);
   }.property('hosts.@each.isDataNode'),
@@ -63,6 +64,10 @@ App.WizardStep6Controller = Em.Controlle
     return this.get('hosts').everyProperty('isRegionServer', false);
   }.property('hosts.@each.isRegionServer'),
 
+  isNoClients: function () {
+    return this.get('hosts').everyProperty('isClient', false);
+  }.property('hosts.@each.isClient'),
+
   /**
    * Return whether Hbase service was selected or not.
    * Calculate this information on <code>content.services</code> variable
@@ -81,6 +86,15 @@ App.WizardStep6Controller = Em.Controlle
     return this.get('content.services').findProperty('serviceName', 'MAPREDUCE').get('isSelected');
 	}.property('content'),
 
+  clearError: function () {
+    if (this.get('isNoDataNodes') === false &&
+        (this.get('isNoTaskTrackers') === false || this.get('isMrSelected') === false) &&
+        (this.get('isNoRegionServers') === false || this.get('isHbSelected') === false) &&
+        this.get('isNoClients') === false) {
+      this.set('errorMessage', '');
+    }
+  }.observes('isNoDataNodes', 'isNoTaskTrackers', 'isNoRegionServers', 'isNoClients'),
+
   /**
    * Check whether current host is currently selected as master
    * @param hostname
@@ -102,6 +116,10 @@ App.WizardStep6Controller = Em.Controlle
     this.get('hosts').setEach('isRegionServer', true);
   },
 
+  selectAllClients: function () {
+    this.get('hosts').setEach('isClient', true);
+  },
+
   deselectAllDataNodes: function () {
     this.get('hosts').setEach('isDataNode', false);
   },
@@ -114,12 +132,17 @@ App.WizardStep6Controller = Em.Controlle
     this.get('hosts').setEach('isRegionServer', false);
   },
 
+  deselectAllClients: function () {
+    this.get('hosts').setEach('isClient', false);
+  },
+
   clearStep: function () {
     this.set('hosts', []);
+    this.clearError();
   },
 
   loadStep: function () {
-    console.log("TRACE: Loading step6: Assign Slaves");
+    console.log("WizardStep6Controller: Loading step6: Assign Slaves");
     this.clearStep();
     this.renderSlaveHosts();
   },
@@ -149,45 +172,72 @@ App.WizardStep6Controller = Em.Controlle
 
     allHosts.forEach(function (_hostName) {
       hostsObj.push(Em.Object.create({
-        hostname: _hostName
+        hostname: _hostName,
+        isMaster: false,
+        isDataNode: false,
+        isTaskTracker: false,
+        isRegionServer: false,
+        isClient: false
       }));
     });
 
     if (!slaveHosts) { // we are at this page for the first time
 
       hostsObj.forEach(function (host) {
+        host.isMaster = this.hasMasterComponents(host.hostname);
         host.isDataNode = host.isTaskTracker
-            = host.isRegionServer = !this.hasMasterComponents(host.hostname);
+            = host.isRegionServer = !host.isMaster;
       }, this);
 
+      if (hostsObj.someProperty('isDataNode', true)) {
+        hostsObj.findProperty('isDataNode', true).set('isClient', true);
+      }
+
     } else {
 
 			var dataNodes = slaveHosts.findProperty('componentName', 'DATANODE');
       dataNodes.hosts.forEach(function (_dataNode) {
         var dataNode = hostsObj.findProperty('hostname', _dataNode.hostname);
         if (dataNode) {
-          dataNode.isDataNode = true;
+          dataNode.set('isDataNode', true);
         }
       });
 
-			var taskTrackers = slaveHosts.findProperty('componentName', 'TASKTRACKER');
-      taskTrackers.hosts.forEach(function (_taskTracker) {
-        var taskTracker = hostsObj.findProperty('hostname', _taskTracker.hostname);
-        if (taskTracker) {
-          taskTracker.isTaskTracker = true;
-        }
-      });
+      if(this.get('isMrSelected')) {
+        var taskTrackers = slaveHosts.findProperty('componentName', 'TASKTRACKER');
+        taskTrackers.hosts.forEach(function (_taskTracker) {
+          var taskTracker = hostsObj.findProperty('hostname', _taskTracker.hostname);
+          if (taskTracker) {
+            taskTracker.set('isTaskTracker', true);
+          }
+        });
+      }
 
       if (this.get('isHbSelected')) {
 				var regionServers = slaveHosts.findProperty('componentName', 'HBASE_REGIONSERVER');
         regionServers.hosts.forEach(function (_regionServer) {
           var regionServer = hostsObj.findProperty('hostname', _regionServer.hostname);
           if (regionServer) {
-            regionServer.isRegionServer = true;
+            regionServer.set('isRegionServer', true);
           }
         });
       }
 
+      var clients = slaveHosts.findProperty('componentName', 'CLIENT');
+      clients.hosts.forEach(function (_client) {
+        var client = hostsObj.findProperty('hostname', _client.hostname);
+        if (client) {
+          client.set('isClient', true);
+        }
+      }, this);
+
+      allHosts.forEach(function (_hostname) {
+        var host = hostsObj.findProperty('hostname', _hostname);
+        if (host) {
+          host.set('isMaster', this.hasMasterComponents(_hostname));
+        }
+      }, this);
+
     }
 
     hostsObj.forEach(function(host){
@@ -196,15 +246,33 @@ App.WizardStep6Controller = Em.Controlle
   },
 
   /**
+   * Return list of master components for specified <code>hostname</code>
+   * @param hostname
+   * @return {*}
+   */
+  getMasterComponentsForHost: function (hostname) {
+    var hostInfo = this.get('content.hostToMasterComponent').findProperty('hostname', hostname);
+    if(hostInfo){
+      return hostInfo.components;
+    }
+
+    return false;
+  },
+
+
+  /**
    * Validate form. Return do we have errors or not
    * @return {Boolean}
    */
   validate: function () {
-    var isOK =  !(this.get('isNoDataNodes') || ( this.get('isMrSelected') && this.get('isNoTaskTrackers')) || ( this.get('isHbSelected') &&this.get('isNoRegionServers')));
-    if(!isOK){
+    var isError =  this.get('isNoDataNodes') || this.get('isNoClients')
+      || ( this.get('isMrSelected') && this.get('isNoTaskTrackers'))
+      || ( this.get('isHbSelected') &&this.get('isNoRegionServers'));
+
+    if(isError){
       this.set('errorMessage', Ember.I18n.t('installer.step6.error.mustSelectOne'));
     }
-    return isOK;
+    return !isError;
   }
 
 });

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service.js?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service.js Mon Oct 29 01:24:10 2012
@@ -63,13 +63,14 @@ App.Component = DS.Model.extend({
   service:DS.belongsTo('App.Service'),
   host:DS.belongsTo('App.Host'),
   workStatus:DS.attr('boolean'),
-  isMaster: function(){
+  isMaster:function () {
     return this.get('type');
   }.property('type'),
-  isSlave: function(){
+  isSlave:function () {
     return !this.get('type');
   }.property('type'),
   // checkedForHostFilter: true // this is for host page to set checkboxes checked
+  decommissioned: DS.attr('boolean')
 });
 
 App.Component.FIXTURES = [
@@ -98,7 +99,8 @@ App.Component.FIXTURES = [
     service_id:1,
     type:false,
     host_id:2,
-    work_status:true
+    work_status:true,
+    decommissioned: true
   },
   {
     id:4,
@@ -139,8 +141,8 @@ App.Component.FIXTURES = [
   {
     id:8,
     component_name:'Oozie',
-    label: 'Oz',
-    type: false,
+    label:'Oz',
+    type:false,
     service_id:5,
     host_id:2,
     work_status:true

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js Mon Oct 29 01:24:10 2012
@@ -34,10 +34,10 @@ App.Router = Em.Router.extend({
   },
 
   clearAllSteps: function() {
-    var totalSteps = 10
+    /*var totalSteps = 10
     for (var step = 1; step <= totalSteps; step++){
       this.get('installerStep' + step + 'Controller').clearStep();
-    }
+    }*/
   },
 
   /*
@@ -137,19 +137,6 @@ App.Router = Em.Router.extend({
     return App.db.getUser();
   },
 
-  login: function (loginName, user) {
-    // TODO: this needs to be hooked up with server authentication
-    console.log("In login function");
-    this.setAuthenticated(true);
-    this.setLoginName(loginName);
-
-//    refactor to get user attributes
-    this.setUser(user);
-
-    this.transitionTo(this.getSection());
-
-  },
-
   resetAuth: function (authenticated) {
     if (!authenticated){
       App.db.cleanUp();
@@ -161,10 +148,11 @@ App.Router = Em.Router.extend({
     return authenticated;
   },
 
-  authenticated: function () {
-    var authenticated = false;
+  login: function (postLogin) {
     var controller = this.get('loginController');
-    var hash = ''; //window.btoa(controller.get('loginName') + ":" + controller.get('password'));
+    var hash = window.btoa(controller.get('loginName') + ":" + controller.get('password'));
+    var router = this;
+
     $.ajax({
       url : '/api/check',
       dataType : 'json',
@@ -172,29 +160,47 @@ App.Router = Em.Router.extend({
       beforeSend: function(xhr) {
         xhr.setRequestHeader("Authorization", "Basic " + hash);
       },
-      statusCode:{
-        200:function(){
+      statusCode: {
+        200: function() {
           console.log('Authorization status: 200');
-          authenticated = true;
         },
-        401:function(){
+        401: function() {
           console.log('Authorization status: 401');
         },
-        403:function(){
+        403: function(){
           console.log('Authorization status: 403');
         }
       },
-      success: function(data){
-        console.log('Success: ');
+      success: function (data) {
+        console.log('login success');
+        router.setAuthenticated(true);
+        router.setLoginName(loginName);
+        // TODO: set real usr
+        router.setUser(App.User.find(1));
+        router.transitionTo(this.getSection());
+        postLogin(true);
       },
-      error:function (req){
-        console.log("Error: " + req.statusText);
+      error: function (req) {
+        console.log("login error: " + req.statusText);
+        router.setAuthenticated(false);
+        postLogin(false);
       }
     });
-//    this.resetAuth(authenticated);
-    this.setAuthenticated(authenticated);
+  },
 
-    return this.getAuthenticated();
+  mockLogin: function (postLogin) {
+    var controller = this.get('loginController');
+
+    if (controller.get('loginName') === 'admin' && controller.get('password') === 'admin') {
+      this.setAuthenticated(true);
+      this.setLoginName('admin');
+      this.setUser(App.User.find(1));
+      this.transitionTo(this.getSection());
+      postLogin(true);
+    } else {
+      this.setAuthenticated(false);
+      postLogin(false);
+    }
   },
 
   defaultSection: 'installer',

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/add_host_routes.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/add_host_routes.js?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/add_host_routes.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/add_host_routes.js Mon Oct 29 01:24:10 2012
@@ -131,6 +131,9 @@ module.exports = Em.Route.extend({
       var addHostController = router.get('addHostController');
       var wizardStep4Controller = router.get('wizardStep4Controller');
       addHostController.saveServices(wizardStep4Controller);
+      addHostController.saveClients(wizardStep4Controller);
+      App.db.setMasterComponentHosts(undefined);
+      App.db.setHostToMasterComponent(undefined);
       router.transitionTo('step4');
     }
   }),
@@ -150,6 +153,7 @@ module.exports = Em.Route.extend({
       var addHostController = router.get('addHostController');
       var wizardStep5Controller = router.get('wizardStep5Controller');
       addHostController.saveMasterComponentHosts(wizardStep5Controller);
+      App.db.setSlaveComponentHosts(undefined);
       router.transitionTo('step5');
     }
   }),
@@ -170,6 +174,7 @@ module.exports = Em.Route.extend({
 
       if (wizardStep6Controller.validate()) {
         addHostController.saveSlaveComponentHosts(wizardStep6Controller);
+        App.db.setServiceConfigProperties(null);
         router.transitionTo('step6');
       }
     }
@@ -226,17 +231,26 @@ module.exports = Em.Route.extend({
     }
   }),
 
-//  step6: Em.Route.extend({
-//    route: '/step6',
-//    connectOutlets: function (router, context) {
-//      router.setNavigationFlow('step6');
-//      router.setInstallerCurrentStep('6', false);
-//      router.get('installerController').connectOutlet('installerStep6');
-//    },
-//    back: Em.Router.transitionTo('step5'),
-//    next: Em.Router.transitionTo('step7')
-//  }),
-//
+  step9: Em.Route.extend({
+    route: '/step9',
+    connectOutlets: function (router, context) {
+      console.log('in addHost.step9:connectOutlets');
+      var controller = router.get('addHostController');
+      controller.setCurrentStep('9', false);
+      controller.loadAllPriorSteps();
+      controller.connectOutlet('wizardStep10');
+    },
+    back: Em.Router.transitionTo('step8'),
+    complete: function (router, context) {
+      if (true) {   // this function will be moved to installerController where it will validate
+        var addHostController = router.get('addHostController');
+        addHostController.setCurrentStep('1', false);
+        router.transitionTo('hosts');
+      } else {
+        console.log('cluster installation failure');
+      }
+    }
+  }),
 
   backToHostsList: function (router, event) {
     router.transitionTo('hosts');

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js Mon Oct 29 01:24:10 2012
@@ -59,19 +59,18 @@ module.exports = Em.Route.extend({
 
   step1: Em.Route.extend({
     route: '/step1',
-    enter: function (router) {
-
-    },
-    connectOutlets: function (router, context) {
+    connectOutlets: function (router) {
       console.log('in installer.step1:connectOutlets');
-      router.setNavigationFlow('step1');
+      var controller = router.get('installerController');
       router.setInstallerCurrentStep('1', false);
-      router.get('installerController').connectOutlet('installerStep1');
+      controller.loadAllPriorSteps();
+      controller.connectOutlet('wizardStep1', controller.get('content'));
     },
-    next: function (router, context) {
-      // App.db.setAllHostNames(undefined);
-      // App.db.setInstallType(undefined);
-      //App.db.setSoftRepo(undefined);
+
+    next: function (router) {
+      var installerController = router.get('installerController');
+      var wizardStep1Controller = router.get('wizardStep1Controller');
+      installerController.saveClusterInfo(wizardStep1Controller);
       router.transitionTo('step2');
     }
   }),
@@ -119,10 +118,18 @@ module.exports = Em.Route.extend({
     connectOutlets: function (router, context) {
       router.setNavigationFlow('step4');
       router.setInstallerCurrentStep('4', false);
-      router.get('installerController').connectOutlet('installerStep4');
+
+      var controller = router.get('installerController');
+      controller.loadAllPriorSteps();
+      controller.connectOutlet('wizardStep4', controller.get('content.services'));
     },
     back: Em.Router.transitionTo('step3'),
-    next: function (router, context) {
+    next: function (router) {
+      var controller = router.get('installerController');
+      var wizardStep4Controller = router.get('wizardStep4Controller');
+      controller.saveServices(wizardStep4Controller);
+      controller.saveClients(wizardStep4Controller);
+
       App.db.setMasterComponentHosts(undefined);
       App.db.setHostToMasterComponent(undefined);
       router.transitionTo('step5');
@@ -134,10 +141,15 @@ module.exports = Em.Route.extend({
     connectOutlets: function (router, context) {
       router.setNavigationFlow('step5');
       router.setInstallerCurrentStep('5', false);
-      router.get('installerController').connectOutlet('installerStep5');
+      var controller = router.get('installerController');
+      controller.loadAllPriorSteps();
+      controller.connectOutlet('wizardStep5', controller.get('content'));
     },
     back: Em.Router.transitionTo('step4'),
-    next: function (router, context) {
+    next: function (router) {
+      var controller = router.get('installerController');
+      var wizardStep5Controller = router.get('wizardStep5Controller');
+      controller.saveMasterComponentHosts(wizardStep5Controller);
       App.db.setSlaveComponentHosts(undefined);
       router.transitionTo('step6');
     }
@@ -148,12 +160,21 @@ module.exports = Em.Route.extend({
     connectOutlets: function (router, context) {
       router.setNavigationFlow('step6');
       router.setInstallerCurrentStep('6', false);
-      router.get('installerController').connectOutlet('installerStep6');
+
+      var controller = router.get('installerController');
+      controller.loadAllPriorSteps();
+      controller.connectOutlet('wizardStep6', controller.get('content'));
     },
     back: Em.Router.transitionTo('step5'),
-    next: function (router, context) {
-      App.db.setServiceConfigProperties(undefined);
-      router.transitionTo('step7');
+    next: function (router) {
+      var controller = router.get('installerController');
+      var wizardStep6Controller = router.get('wizardStep6Controller');
+
+      if (wizardStep6Controller.validate()) {
+        controller.saveSlaveComponentHosts(wizardStep6Controller);
+        App.db.setServiceConfigProperties(null);
+        router.transitionTo('step7');
+      }
     }
   }),
 
@@ -227,6 +248,27 @@ module.exports = Em.Route.extend({
     }
   }),
 
+  step10: Em.Route.extend({
+    route: '/step10',
+    connectOutlets: function (router, context) {
+      console.log('in installer.step10:connectOutlets');
+      var controller = router.get('installerController');
+      router.setInstallerCurrentStep('10', false);
+      controller.loadAllPriorSteps();
+      controller.connectOutlet('wizardStep10');
+    },
+    back: Em.Router.transitionTo('step9'),
+    complete: function (router, context) {
+      if (true) {   // this function will be moved to installerController where it will validate
+        router.setInstallerCurrentStep('1', true);
+        router.setSection('main');
+        router.transitionTo('main');
+      } else {
+        console.log('cluster installation failure');
+      }
+    }
+  }),
+
   gotoStep1: Em.Router.transitionTo('step1'),
 
   gotoStep2: Em.Router.transitionTo('step2'),

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less Mon Oct 29 01:24:10 2012
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-.gradient(@color: #FAFAFA, @start: #FFFFFF, @stop: #F2F2F2){
+.gradient(@color: #FAFAFA, @start: #FFFFFF, @stop: #F2F2F2) {
   background: @color;
   background: -webkit-gradient(linear, left top, left bottom, color-stop(0, @start), color-stop(1, @stop));
   background: -ms-linear-gradient(top, @start, @stop);
@@ -128,7 +128,7 @@ footer {
     font-size: 17px;
     border-right: 1px solid rgba(0, 0, 0, 0.08);
   }
-  .operations-count{
+  .operations-count {
     background-color: #006DCC;
   }
   li {
@@ -244,6 +244,9 @@ h1 {
       color: #FF4B4B;
     }
   }
+  #step6 .pre-scrollable {
+    max-height: 440px;
+  }
   #serviceConfig {
     .accordion-heading {
       background-color: #f0f0f0;
@@ -576,11 +579,11 @@ a:focus {
 /*end alerts summary*/
 
 /*start chart/style graphs*/
-.chart-container{
+.chart-container {
   position: relative;
   margin: 20px 15px 0px 15px;
-  
-  .chart{
+
+  .chart {
     padding-bottom: 0px !important;
     position: relative;
     height: 160px;
@@ -616,6 +619,7 @@ a:focus {
     font-size: small;
   }
 }
+
 /*end chart/graph styles*/
 
 /*****end styles for dashboard page*****/
@@ -630,13 +634,10 @@ a:focus {
       list-style: none;
       height: 20px;
       width: 20px;
-      margin-left: 0;
-
-    //      padding-left: 30px;
+      margin-left: 0; //      padding-left: 30px;
     //      padding-right: 30px;
     //      background-position: 12px 9px;
     //      background-repeat: no-repeat;
-
     }
     .health-status-LIVE {
       .tab-marker-position;
@@ -685,7 +686,7 @@ a:focus {
   }
   .service-content {
     padding: 5px 0 0 10px;
-    .service-links{
+    .service-links {
       padding: 5px 0;
     }
   }
@@ -719,13 +720,13 @@ a:focus {
   }
 }
 
-.summary-metric-graphs{
+.summary-metric-graphs {
   [class*="span"] {
     float: left;
     margin-left: 10px;
   }
-  .chart-container{
-    .chart-x-axis{
+  .chart-container {
+    .chart-x-axis {
       left: 0%;
       width: 100%;
     }
@@ -810,8 +811,8 @@ a:focus {
       margin-top: 3px;
     }
     .dropdown {
-       margin-top: 3px;
-     }
+      margin-top: 3px;
+    }
     .dropdown select {
       width: 60px;
     }
@@ -831,7 +832,6 @@ a:focus {
     }
     .page-listing {
       width: 100px;
-
       .table {
         th.name {
           width: 300px;
@@ -844,87 +844,88 @@ a:focus {
       }
     }
   }
-}
-
-#host-details {
-  .health-status-LIVE {
-    background-image: @status-live-marker;
-    background-repeat: no-repeat;
-    background-position: 0px 4px;
-  }
-  .health-status-DEAD {
-    background-image: @status-dead-marker;
-    background-repeat: no-repeat;
-    background-position: 0px 4px;
-  }
-  .health-status-DEAD-ORANGE {
-    background-image: @status-dead-orange-marker;
-    background-repeat: no-repeat;
-    background-position: 0px 4px;
-  }
-  .health-status-DEAD-YELLOW {
-    background-image: @status-dead-yellow-marker;
-    background-repeat: no-repeat;
-    background-position: 0px 4px;
-  }
-  .back {
-    display: block;
-    width: 105px;
-    margin-bottom: 5px;
   }
-  .box-header .host-title {
-    margin: 0;
-    padding-left: 17px;
-  }
-  .box-header .button-section {
-    margin-bottom: 5px;
-  }
-  hr {
-    margin-bottom: 0;
-    clear: both;
-  }
-  .content {
-    padding: 10px;
-  }
-  .host-configuration .dl-horizontal dt {
-    width: 90px;
-    line-height: 20px;
-  }
-  .host-configuration .dl-horizontal dd {
-    margin-left: 100px;
-    line-height: 20px;
-  }
-  .host-components {
-    padding: 10px;
-    padding-bottom: 0;
-    border: 1px solid #DEDEDE;
-    border-radius: 4px;
-    background: #F5F5F5;
-  }
-  .host-components .btn-group {
-    margin: 0 5px 10px 0;
-  }
-}
-.background-operations {
-  .open-details{
-    clear: left;
-    display: block;
-    float: left;
-    text-decoration: none;
-    width: 16px;
+
+  #host-details {
+    .health-status-LIVE {
+      background-image: @status-live-marker;
+      background-repeat: no-repeat;
+      background-position: 0px 4px;
+    }
+    .health-status-DEAD {
+      background-image: @status-dead-marker;
+      background-repeat: no-repeat;
+      background-position: 0px 4px;
+    }
+    .health-status-DEAD-ORANGE {
+      background-image: @status-dead-orange-marker;
+      background-repeat: no-repeat;
+      background-position: 0px 4px;
+    }
+    .health-status-DEAD-YELLOW {
+      background-image: @status-dead-yellow-marker;
+      background-repeat: no-repeat;
+      background-position: 0px 4px;
+    }
+    .back {
+      display: block;
+      width: 105px;
+      margin-bottom: 5px;
+    }
+    .box-header .host-title {
+      margin: 0;
+      padding-left: 17px;
+    }
+    .box-header .button-section {
+      margin-bottom: 5px;
+    }
+    hr {
+      margin-bottom: 0;
+      clear: both;
+    }
+    .content {
+      padding: 10px;
+    }
+    .host-configuration .dl-horizontal dt {
+      width: 90px;
+      line-height: 20px;
+    }
+    .host-configuration .dl-horizontal dd {
+      margin-left: 100px;
+      line-height: 20px;
+    }
+    .host-components {
+      padding: 10px;
+      padding-bottom: 0;
+      border: 1px solid #DEDEDE;
+      border-radius: 4px;
+      background: #F5F5F5;
+    }
+    .host-components .btn-group {
+      margin: 0 5px 10px 0;
+    }
   }
-  .operation-details {
-    padding-left: 16px;
-    padding-top: 5px;
-    display: none;
+  .background-operations {
+    .open-details {
+      clear: left;
+      display: block;
+      float: left;
+      text-decoration: none;
+      width: 16px;
+    }
+    .operation-details {
+      padding-left: 16px;
+      padding-top: 5px;
+      display: none;
+    }
+    margin-bottom: 10px;
   }
-margin-bottom: 10px;
-}
-.background-operations.is-open {
-  .operation-details {
-    display: block;
+  .background-operations.is-open {
+    .operation-details {
+      display: block;
+    }
   }
-}
+
 /*End Hosts*/
 
 /*assign masters*/
@@ -1491,6 +1492,7 @@ ul.inline li {
 .ui-timepicker-rtl dl dd {
   margin: 0 65px 10px 10px;
 }
+
 /* end css for timepicker */
 
 #slider {
@@ -1511,20 +1513,20 @@ ul.inline li {
 
 /* TIME RANGE WIDGET END */
 
-#host-details .host-components .btn-group > .btn{
+#host-details .host-components .btn-group > .btn {
   min-width: 130px;
 }
 
-#host-details > .host-maintenance{
+#host-details > .host-maintenance {
   text-align: right;
   margin-top: -20px;
 }
 
-#host-details > .host-maintenance > div{
+#host-details > .host-maintenance > div {
   text-align: left;
 }
 
-#host-details > .host-title{
+#host-details > .host-title {
   background-position: 0px center;
   padding-left: 17px;
 }
@@ -1534,26 +1536,29 @@ ul.inline li {
   border: 2px solid black;
   padding: 10px;
 }
+
 .fieldset legend {
   border-bottom: none;
   width: auto;
   font-size: 14px;
 }
+
 /* fieldset end */
 
 /* Start Carousel */
 .carousel-inner {
   height: 80px;
 }
+
 /* End Carousel*/
 
 #add-host .back,
-#add-service .back{
+#add-service .back {
   display: block;
   width: 105px;
   margin-bottom: 10px;
 }
 
-#step8-content{
+#step8-content {
   max-height: 570px;
-}
+}
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hbase.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hbase.hbs?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hbase.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hbase.hbs Mon Oct 29 01:24:10 2012
@@ -18,7 +18,7 @@
 
 <div class="clearfix">
   <div class="name span2">
-    {{view App.MainDashboardServiceHealthView parentBinding="view"}}
+    {{view App.MainDashboardServiceHealthView serviceBinding="view.service"}}
     <a {{action selectService view.service href=true}}>{{view.service.label}}</a>
     {{#if view.criticalAlertsCount}}
     <span class="label label-important alerts-count">{{view.criticalAlertsCount}}</span>

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hive.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hive.hbs?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hive.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hive.hbs Mon Oct 29 01:24:10 2012
@@ -18,7 +18,7 @@
 
 <div class="clearfix">
   <div class="name span2">
-    {{view App.MainDashboardServiceHealthView parentBinding="view"}}
+    {{view App.MainDashboardServiceHealthView serviceBinding="view.service"}}
     <a {{action selectService view.service href=true}}>{{view.service.label}}</a>
     {{#if view.criticalAlertsCount}}
     <span class="label label-important alerts-count">{{view.criticalAlertsCount}}</span>

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs Mon Oct 29 01:24:10 2012
@@ -17,7 +17,7 @@
 -->
 <div class="clearfix">
   <div class="name span2">
-    {{view App.MainDashboardServiceHealthView parentBinding="view"}}
+    {{view App.MainDashboardServiceHealthView serviceBinding="view.service"}}
     <a {{action selectService view.service href=true}}>{{view.service.label}}</a>
     {{#if view.criticalAlertsCount}}
       <span class="label label-important alerts-count">{{view.criticalAlertsCount}}</span>

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/oozie.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/oozie.hbs?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/oozie.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/oozie.hbs Mon Oct 29 01:24:10 2012
@@ -18,7 +18,7 @@
 
 <div class="clearfix">
   <div class="name span2">
-    {{view App.MainDashboardServiceHealthView parentBinding="view"}}
+    {{view App.MainDashboardServiceHealthView serviceBinding="view.service"}}
     <a {{action selectService view.service href=true}}>{{view.service.label}}</a>
     {{#if view.criticalAlertsCount}}
     <span class="label label-important alerts-count">{{view.criticalAlertsCount}}</span>

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/zookeeper.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/zookeeper.hbs?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/zookeeper.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/zookeeper.hbs Mon Oct 29 01:24:10 2012
@@ -18,7 +18,7 @@
 
 <div class="clearfix">
   <div class="name span2">
-    {{view App.MainDashboardServiceHealthView parentBinding="view"}}
+    {{view App.MainDashboardServiceHealthView serviceBinding="view.service"}}
     <a {{action selectService view.service href=true}}>{{view.service.label}}</a>
     {{#if view.criticalAlertsCount}}
     <span class="label label-important alerts-count">{{view.criticalAlertsCount}}</span>

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host.hbs?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host.hbs Mon Oct 29 01:24:10 2012
@@ -21,7 +21,7 @@
       <div class="btn-group">
         <button {{bindAttr disabled="controller.isDisabled"}} class="btn btn-primary dropdown-toggle"
                                                               data-toggle="dropdown">
-          Rack
+          Assign Rack
           <span class="caret"></span>
         </button>
         <ul class="dropdown-menu">
@@ -35,17 +35,17 @@
           {{/each}}
         </ul>
       </div>
-      <button {{bindAttr disabled="controller.isDisabled"}} class="btn btn-primary decommission"
+     <!-- <button {{bindAttr disabled="controller.isDisabled"}} class="btn btn-primary decommission"
                                                             data-toggle="modal" {{action "decommissionButtonPopup" target="controller"}}>
         Decommission
       </button>
       <button {{bindAttr disabled="controller.isDisabled"}} class="btn btn-primary"
                                                             data-toggle="modal" {{action "deleteButtonPopup" target="controller"}}>
         Delete
-      </button>
+      </button>-->
       <button class="btn btn-inverse add-host-button" {{action addHost}}>
         <i class="icon-plus icon-white"></i>
-        Add New Host
+        Add New Hosts
       </button>
     </div>
   </div>

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/summary.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/summary.hbs?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/summary.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/summary.hbs Mon Oct 29 01:24:10 2012
@@ -38,12 +38,12 @@
         </button>
         <ul class="dropdown-menu">
           {{#if view.isDataNode}}
-            <li>
+            <li {{bindAttr class="view.content.decommissioned:hidden:"}}>
               <a href="javascript:void(null)" data-toggle="modal" {{action "decommission" view.content target="controller"}}>
                 Decommission
               </a>
             </li>
-            <li>
+            <li {{bindAttr class="view.content.decommissioned::hidden"}}>
               <a href="javascript:void(null)" data-toggle="modal" {{action "recommission" view.content target="controller"}}>
                 Recommission
               </a>

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/menu_item.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/menu_item.hbs?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/menu_item.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/menu_item.hbs Mon Oct 29 01:24:10 2012
@@ -22,9 +22,9 @@
       {{view.alertsCount}}
     </span>
   {{/if}}
-  {{#if view.hostDetailsOperationsCount}}
-    <span class="label operations-count" {{action "showBackgroundOperationsPopup" target="App.router.mainHostDetailsController"}}>
-      {{view.hostDetailsOperationsCount}}
-    </span>
-  {{/if}}
+  <!--{{#if view.hostDetailsOperationsCount}}-->
+    <!--<span class="label operations-count" {{action "showBackgroundOperationsPopup" target="App.router.mainHostDetailsController"}}>-->
+      <!--{{view.hostDetailsOperationsCount}}-->
+    <!--</span>-->
+  <!--{{/if}}-->
 </a>

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step1.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step1.hbs?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step1.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step1.hbs Mon Oct 29 01:24:10 2012
@@ -29,7 +29,7 @@
   </label>
 
   <div class="controls">
-    {{view Ember.TextField id="cluster-name" valueBinding="content.name" placeholder="cluster name" target="controller"}}
+    {{view Ember.TextField id="cluster-name" valueBinding="content.cluster.name" placeholder="cluster name" target="controller"}}
     <p class="help-inline">{{clusterNameError}}</p>
   </div>
 </div>

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step10.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step10.hbs?rev=1403142&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step10.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step10.hbs Mon Oct 29 01:24:10 2012
@@ -0,0 +1,26 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
+<h2>{{t installer.step10.header}}</h2>
+<div class="btn-area">
+  <a
+    class="btn pull-left" {{bindAttr disabled="isSubmitDisabled"}} {{action back}}>&larr;
+    Back</a>
+  <a
+    class="btn btn-success pull-right" {{bindAttr disabled="isSubmitDisabled"}} {{action complete}}>Complete &rarr;</a>
+</div>

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step6.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step6.hbs?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step6.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step6.hbs Mon Oct 29 01:24:10 2012
@@ -19,10 +19,12 @@
 <div id="step6">
   <h2>{{t installer.step6.header}}</h2>
 
-  <div class="alert alert-info">{{t installer.step6.body}}</div>
+  <div class="alert alert-info">{{{view.label}}}</div>
   {{#if errorMessage}}
   <div class="alert alert-error">{{errorMessage}}</div>
   {{/if}}
+
+  <div class="pre-scrollable">
   <table class="table table-striped">
     <thead>
       <tr>
@@ -52,13 +54,23 @@
             {{action deselectAllRegionServers target="controller"}}>none</a>
         </th>
       {{/if}}
+        <th>
+          <a href="#" {{bindAttr class="isAllClients:selected:deselected"}} {{action selectAllClients target="controller"}}>all</a>
+          |
+          <a href="#" {{bindAttr class="isNoClients:selected:deselected"}} {{action deselectAllClients target="controller"}}>none</a>
+        </th>
       </tr>
     </thead>
     <tbody>
 
     {{#each hosts}}
     <tr>
-      <td>{{hostname}}</td>
+        {{#view App.WizardStep6HostView hostBinding = "this" }}
+          {{hostname}}
+          {{#if isMaster}}
+            <i class=icon-asterisks>&#10037</i>
+          {{/if}}
+        {{/view}}
       <td><label class="checkbox">{{view Ember.Checkbox checkedBinding="isDataNode"}}DataNode</label></td>
       {{#if controller.isMrSelected}}
       <td><label class="checkbox">{{view Ember.Checkbox checkedBinding="isTaskTracker"}}TaskTracker</label></td>
@@ -66,10 +78,12 @@
       {{#if controller.isHbSelected}}
       <td><label class="checkbox">{{view Ember.Checkbox checkedBinding="isRegionServer"}}RegionServer</label></td>
       {{/if}}
+      <td><label class="checkbox">{{view Ember.Checkbox checkedBinding="isClient"}}Client</label></td>
     </tr>
     {{/each}}
     </tbody>
   </table>
+  </div>
   <div class="btn-area">
     <a class="btn" {{action back href="true"}}>&larr; Back</a>
     <a class="btn btn-success pull-right" {{action next}}>Next &rarr;</a>

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/base64.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/base64.js?rev=1403142&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/base64.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/base64.js Mon Oct 29 01:24:10 2012
@@ -0,0 +1,78 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+(function () {
+
+  var
+    object = typeof window != 'undefined' ? window : exports,
+    chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',
+    INVALID_CHARACTER_ERR = (function () {
+      // fabricate a suitable error object
+      try {
+        document.createElement('$');
+      }
+      catch (error) {
+        return error;
+      }
+    }());
+
+  // encoder
+  // [https://gist.github.com/999166] by [https://github.com/nignag]
+  object.btoa || (
+    object.btoa = function (input) {
+      for (
+        // initialize result and counter
+        var block, charCode, idx = 0, map = chars, output = '';
+        // if the next input index does not exist:
+        // change the mapping table to "="
+        // check if d has no fractional digits
+        input.charAt(idx | 0) || (map = '=', idx % 1);
+        // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8
+        output += map.charAt(63 & block >> 8 - idx % 1 * 8)
+        ) {
+        charCode = input.charCodeAt(idx += 3 / 4);
+        if (charCode > 0xFF) throw INVALID_CHARACTER_ERR;
+        block = block << 8 | charCode;
+      }
+      return output;
+    });
+
+  // decoder
+  // [https://gist.github.com/1020396] by [https://github.com/atk]
+  object.atob || (
+    object.atob = function (input) {
+      input = input.replace(/=+$/, '')
+      if (input.length % 4 == 1) throw INVALID_CHARACTER_ERR;
+      for (
+        // initialize result and counters
+        var bc = 0, bs, buffer, idx = 0, output = '';
+        // get next character
+        buffer = input.charAt(idx++);
+        // character found in table? initialize bit storage and add its ascii value;
+        ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer,
+          // and if not first of each 4 characters,
+          // convert the first 8 bits to one ascii character
+          bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0
+        ) {
+        // try to find character in table (0-63, not found => -1)
+        buffer = chars.indexOf(buffer);
+      }
+      return output;
+    });
+
+}());
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js Mon Oct 29 01:24:10 2012
@@ -100,13 +100,8 @@ require('views/main/charts/heatmap/heatm
 require('views/main/apps_view');
 require('views/main/apps/item_view');
 require('views/installer');
-require('views/installer/step1_view');
 require('views/installer/step2_view');
 require('views/installer/step3_view');
-require('views/installer/step4_view');
-require('views/installer/step5_view');
-require('views/installer/step6_view');
-require('views/installer/step10_view');
 require('views/wizard/controls_view');
 require('views/wizard/step1_view');
 require('views/wizard/step2_view');
@@ -117,3 +112,4 @@ require('views/wizard/step6_view');
 require('views/wizard/step7_view');
 require('views/wizard/step8_view');
 require('views/wizard/step9_view');
+require('views/wizard/step10_view');

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/menu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/menu.js?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/menu.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/menu.js Mon Oct 29 01:24:10 2012
@@ -27,7 +27,7 @@ App.MainAdminMenuView = Em.CollectionVie
     {
       route:'authentication',
       label:'Authentication'
-    },
+    }/*,
     {
       route:'security',
       label:'Security'
@@ -35,7 +35,7 @@ App.MainAdminMenuView = Em.CollectionVie
     {
       route:'audit',
       label:'Audit'
-    }
+    }*/
     /*,
     {
       route:'advanced',

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/menu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/menu.js?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/menu.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/menu.js Mon Oct 29 01:24:10 2012
@@ -22,8 +22,8 @@ App.MainChartsMenuView = Em.CollectionVi
   tagName: 'ul',
   classNames: ["nav", "nav-tabs"],
   content:[
-    { label:'Heatmap', routing:'heatmap', active:"active"},
-    { label:'Horizon Chart', routing:'horizon_chart'}
+    /*{ label:'Heatmap', routing:'heatmap', active:"active"},
+    { label:'Horizon Chart', routing:'horizon_chart'}*/
   ],
 
   init: function(){ this._super(); this.activateView(); },

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/menu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/menu.js?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/menu.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/menu.js Mon Oct 29 01:24:10 2012
@@ -22,8 +22,8 @@ App.MainHostMenuView = Em.CollectionView
   tagName: 'ul',
   classNames: ["nav", "nav-tabs"],
   content:[
-    { label:'Summary', routing:'summary'},
-    { label:'Audit', routing:'audit'}
+ /*   { label:'Summary', routing:'summary'},
+    { label:'Audit', routing:'audit'}*/
   ],
 
   init: function(){ this._super(); this.activateView(); },

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/menu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/menu.js?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/menu.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/menu.js Mon Oct 29 01:24:10 2012
@@ -69,13 +69,13 @@ App.MainMenuView = Em.CollectionView.ext
       }
     }.property(),
 
-    hostDetailsOperationsCount:function () {
-      if (this.get('content').routing == 'hosts') {
-        if (App.router.currentState.parentState.name == 'hostDetails') {
-          return App.router.get('mainHostDetailsController.hostOperationsCount');
-        }
-      }
-    }.property('App.router.currentState.parentState.name', 'App.router.mainHostDetailsController.hostOperationsCount'),
+//    hostDetailsOperationsCount:function () {
+//      if (this.get('content').routing == 'hosts') {
+//        if (App.router.currentState.parentState.name == 'hostDetails') {
+//          return App.router.get('mainHostDetailsController.hostOperationsCount');
+//        }
+//      }
+//    }.property('App.router.currentState.parentState.name', 'App.router.mainHostDetailsController.hostOperationsCount'),
 
     templateName: require('templates/main/menu_item')
   })

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/menu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/menu.js?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/menu.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/menu.js Mon Oct 29 01:24:10 2012
@@ -23,9 +23,8 @@ App.MainServiceInfoMenuView = Em.Collect
   classNames: ["nav", "nav-tabs"],
   content:[
     { label:'Summary', routing:'summary', active:"active"},
-    { label:'Metrics', routing:'metrics'},
-    { label:'Configs', routing:'configs'},
-    { label:'Audit', routing:'audit'}
+    { label:'Configs', routing:'configs'}/*,
+    { label:'Audit', routing:'audit'}*/
   ],
 
   init: function(){ this._super(); this.activateView(); },

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step10_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step10_view.js?rev=1403142&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step10_view.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step10_view.js Mon Oct 29 01:24:10 2012
@@ -0,0 +1,31 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+var App = require('app');
+
+App.WizardStep10View = Em.View.extend({
+
+  templateName: require('templates/wizard/step10'),
+
+  didInsertElement: function () {
+    var controller = this.get('controller');
+    controller.navigateStep();
+  }
+
+});
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step5_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step5_view.js?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step5_view.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step5_view.js Mon Oct 29 01:24:10 2012
@@ -27,9 +27,12 @@ App.WizardStep5View = Em.View.extend({
     var controller = this.get('controller');
     controller.loadStep();
 
-    var ZooKeeper = controller.lastZooKeeper();
-    if (ZooKeeper) {
-      ZooKeeper.set('showAddControl', true);
+    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);
+      }
     }
   }
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step6_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step6_view.js?rev=1403142&r1=1403141&r2=1403142&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step6_view.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step6_view.js Mon Oct 29 01:24:10 2012
@@ -25,7 +25,47 @@ App.WizardStep6View = Em.View.extend({
 
   didInsertElement: function () {
     var controller = this.get('controller');
+    this.setLabel();
+    $('body').tooltip({
+      selector: '[rel=tooltip]'
+    });
     controller.loadStep();
+  },
+
+  setLabel: function () {
+    var label = Em.I18n.t('installer.step6.body');
+    var clients = this.get('controller.content.clients');
+    clients.forEach(function (_client) {
+      if (clients.length === 1) {
+        label = label + ' ' + _client.display_name;
+      } else if (_client !== clients[clients.length - 1]) {           // [clients.length - 1]
+        label = label + ' ' + _client.display_name;
+        if(_client !== clients[clients.length - 2]) {
+          label = label + ',';
+  }
+      } else {
+        label = label + ' and ' + _client.display_name + '.';
+      }
+    }, this);
+    this.set('label', label);
   }
+});
+
+App.WizardStep6HostView = Em.View.extend({
 
+  host: null,
+  tagName: 'td',
+
+  didInsertElement: function () {
+    var components = this.get('controller').getMasterComponentsForHost(this.get('host.hostname'));
+    if(components){
+      components = components.join(" /\n");
+      this.$().popover({
+        title: 'master components hosted on ' + this.get('host.hostname'),
+        content: components,
+        placement: 'right',
+        trigger: 'hover'
+      });
+    }
+  }
 });



Mime
View raw message