incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject svn commit: r1449226 - in /incubator/ambari/trunk: ./ ambari-web/app/ ambari-web/app/controllers/main/service/ ambari-web/app/controllers/wizard/ ambari-web/app/routes/ ambari-web/app/styles/ ambari-web/app/templates/ ambari-web/app/templates/main/host...
Date Fri, 22 Feb 2013 21:39:47 GMT
Author: yusaku
Date: Fri Feb 22 21:39:46 2013
New Revision: 1449226

URL: http://svn.apache.org/r1449226
Log:
AMBARI-1482. Reassign Master Wizard - Step 1. (yusaku)

Added:
    incubator/ambari/trunk/ambari-web/app/controllers/main/service/reassign_controller.js
    incubator/ambari/trunk/ambari-web/app/controllers/wizard/step11_controller.js
    incubator/ambari/trunk/ambari-web/app/routes/reassign_master_routes.js
    incubator/ambari/trunk/ambari-web/app/templates/main/service/reassign.hbs
    incubator/ambari/trunk/ambari-web/app/templates/wizard/step11.hbs
    incubator/ambari/trunk/ambari-web/app/views/main/service/reassign_view.js
    incubator/ambari/trunk/ambari-web/app/views/wizard/step11_view.js
Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/controllers.js
    incubator/ambari/trunk/ambari-web/app/controllers/main/service/item.js
    incubator/ambari/trunk/ambari-web/app/messages.js
    incubator/ambari/trunk/ambari-web/app/router.js
    incubator/ambari/trunk/ambari-web/app/routes/main.js
    incubator/ambari/trunk/ambari-web/app/styles/application.less
    incubator/ambari/trunk/ambari-web/app/templates/installer.hbs
    incubator/ambari/trunk/ambari-web/app/templates/main/host/add.hbs
    incubator/ambari/trunk/ambari-web/app/templates/main/service/add.hbs
    incubator/ambari/trunk/ambari-web/app/utils/db.js
    incubator/ambari/trunk/ambari-web/app/views.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1449226&r1=1449225&r2=1449226&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Fri Feb 22 21:39:46 2013
@@ -12,6 +12,8 @@ Trunk (unreleased changes):
 
  NEW FEATURES
 
+ AMBARI-1482. Reassign Master Wizard - Step 1. (yusaku)
+
  AMBARI-1481. Stack Upgrade Wizard - Step 2 (confirm and check all master
  components are running). (yusaku)
 

Modified: incubator/ambari/trunk/ambari-web/app/controllers.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers.js?rev=1449226&r1=1449225&r2=1449226&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers.js Fri Feb 22 21:39:46 2013
@@ -39,6 +39,7 @@ require('controllers/main/service/info/s
 require('controllers/main/service/info/configs');
 require('controllers/main/service/info/audit');
 require('controllers/main/service/add_controller');
+require('controllers/main/service/reassign_controller');
 require('controllers/main/host');
 require('controllers/main/host/details');
 require('controllers/main/host/add_controller');
@@ -71,6 +72,7 @@ require('controllers/wizard/step7_contro
 require('controllers/wizard/step8_controller');
 require('controllers/wizard/step9_controller');
 require('controllers/wizard/step10_controller');
+require('controllers/wizard/step11_controller');
 require('controllers/wizard/stack_upgrade/step1_controller');
 require('controllers/wizard/stack_upgrade/step2_controller');
 require('controllers/global/cluster_controller');

Modified: incubator/ambari/trunk/ambari-web/app/controllers/main/service/item.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/service/item.js?rev=1449226&r1=1449225&r2=1449226&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/service/item.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/service/item.js Fri Feb 22 21:39:46
2013
@@ -193,14 +193,8 @@ App.MainServiceItemController = Em.Contr
    */
   reassignMaster: function (hostComponent) {
     console.log('In Reassign Master', hostComponent);
-    App.ModalPopup.show({
-      header: 'Reassign Master Wizard',
-      body: 'Reassign Master Wizard',
-      secondary: false,
-      onPrimary: function() {
-        this.hide();
-      }
-    });
+    App.router.get('reassignMasterController').saveComponentToReassign(hostComponent);
+    App.router.transitionTo('reassignMaster');
   },
 
   /**

Added: incubator/ambari/trunk/ambari-web/app/controllers/main/service/reassign_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/service/reassign_controller.js?rev=1449226&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/service/reassign_controller.js
(added)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/service/reassign_controller.js
Fri Feb 22 21:39:46 2013
@@ -0,0 +1,200 @@
+/**
+ * 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.ReassignMasterController = App.WizardController.extend({
+
+  name: 'reassignMasterController',
+
+  totalSteps: 6,
+
+  /**
+   * Used for hiding back button in wizard
+   */
+  hideBackButton: true,
+
+  /**
+   * All wizards data will be stored in this variable
+   *
+   * cluster - cluster name
+   * installOptions - ssh key, repo info, etc.
+   * services - services list
+   * hosts - list of selected hosts
+   * slaveComponentHosts, - info about slave hosts
+   * masterComponentHosts - info about master hosts
+   * config??? - to be described later
+   */
+  content: Em.Object.create({
+    cluster: null,
+    hosts: null,
+    installOptions: null,
+    services: null,
+    slaveComponentHosts: null,
+    masterComponentHosts: null,
+    serviceConfigProperties: null,
+    advancedServiceConfig: null,
+    controllerName: 'reassignMasterController',
+    isWizard: true,
+    reassign: null
+  }),
+
+  /**
+   * return new object extended from clusterStatusTemplate
+   * @return Object
+   */
+  getCluster: function(){
+    return jQuery.extend({}, this.get('clusterStatusTemplate'), {name: App.router.getClusterName()});
+  },
+
+  /**
+   * return true if cluster data is loaded and false otherwise
+   */
+  dataLoading: function(){
+    var dfd = $.Deferred();
+    this.connectOutlet('loading');
+    if (App.router.get('clusterController.isLoaded')){
+      dfd.resolve();
+    } else{
+      var interval = setInterval(function(){
+        if (App.router.get('clusterController.isLoaded')){
+          dfd.resolve();
+          clearInterval(interval);
+        }
+      },50);
+    }
+    return dfd.promise();
+  },
+
+  /**
+   * Load services data from server.
+   */
+  loadServicesFromServer: function() {
+    var displayOrderConfig = require('data/services');
+    var apiUrl = App.get('stackVersionURL');
+    var apiService = this.loadServiceComponents(displayOrderConfig, apiUrl);
+    //
+    apiService.forEach(function(item, index){
+      apiService[index].isSelected = App.Service.find().someProperty('id', item.serviceName);
+      apiService[index].isDisabled = apiService[index].isSelected;
+      apiService[index].isInstalled = apiService[index].isSelected;
+    });
+    this.set('content.services', apiService);
+    App.db.setService(apiService);
+  },
+
+  /**
+   * Load confirmed hosts.
+   * Will be used at <code>Assign Masters(step5)</code> step
+   */
+  loadConfirmedHosts: function(){
+    var hosts = App.db.getHosts();
+    if(!hosts || !hosts.length){
+      var hosts = {};
+
+      App.Host.find().forEach(function(item){
+        hosts[item.get('id')] = {
+          name: item.get('id'),
+          cpu: item.get('cpu'),
+          memory: item.get('memory'),
+          disk_info: item.get('diskInfo'),
+          bootStatus: "REGISTERED",
+          isInstalled: true
+        };
+      });
+      App.db.setHosts(hosts);
+    }
+
+    this.set('content.hosts', hosts);
+    console.log('ReassignMasterController.loadConfirmedHosts: loaded hosts', hosts);
+  },
+
+  /**
+   * Load master component hosts data for using in required step controllers
+   */
+  loadMasterComponentHosts: function () {
+    var masterComponentHosts = App.db.getMasterComponentHosts();
+    if(!masterComponentHosts){
+      masterComponentHosts = [];
+      App.HostComponent.find().filterProperty('isMaster', true).forEach(function(item){
+        masterComponentHosts.push({
+          component: item.get('componentName'),
+          hostName: item.get('host.hostName'),
+          isInstalled: true
+        })
+      });
+
+    }
+    this.set("content.masterComponentHosts", masterComponentHosts);
+    console.log("ReassignMasterController.loadMasterComponentHosts: loaded hosts ", masterComponentHosts);
+
+    this.set('content.missMasterStep', this.get('content.masterComponentHosts').everyProperty('isInstalled',
true));
+  },
+
+  loadComponentToReassign: function () {
+    var masterComponent = App.db.getMasterToReassign();
+    if (masterComponent) {
+      this.set('content.reassign', masterComponent);
+    }
+  },
+
+  saveComponentToReassign: function (masterComponent) {
+      App.db.setMasterToReassign(masterComponent);
+  },
+
+  /**
+   * Load data for all steps until <code>current step</code>
+   */
+  loadAllPriorSteps: function () {
+    var step = this.get('currentStep');
+    switch (step) {
+      case '6':
+      case '5':
+      case '4':
+      case '3':
+      case '2':
+        this.loadServicesFromServer();
+        this.loadMasterComponentHosts();
+        this.loadConfirmedHosts();
+      case '1':
+        this.loadComponentToReassign();
+    }
+  },
+
+  /**
+   * Remove all loaded data.
+   * Created as copy for App.router.clearAllSteps
+   */
+  clearAllSteps: function () {
+    this.clearInstallOptions();
+    // clear temporary information stored during the install
+    this.set('content.cluster', this.getCluster());
+  },
+
+  /**
+   * Clear all temporary data
+   */
+  finish: function () {
+    this.setCurrentStep('1');
+    this.clearAllSteps();
+    this.clearStorageData();
+    App.router.get('updateController').updateAll();
+  }
+
+});

Added: incubator/ambari/trunk/ambari-web/app/controllers/wizard/step11_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step11_controller.js?rev=1449226&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/wizard/step11_controller.js (added)
+++ incubator/ambari/trunk/ambari-web/app/controllers/wizard/step11_controller.js Fri Feb
22 21:39:46 2013
@@ -0,0 +1,22 @@
+/**
+ * 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.WizardStep11Controller = Em.Controller.extend();
+

Modified: incubator/ambari/trunk/ambari-web/app/messages.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/messages.js?rev=1449226&r1=1449225&r2=1449226&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/messages.js (original)
+++ incubator/ambari/trunk/ambari-web/app/messages.js Fri Feb 22 21:39:46 2013
@@ -388,6 +388,7 @@ Em.I18n.translations = {
   'installer.step10.startStatus.started':'All services started',
   'installer.step10.installTime.seconds':'Install and start completed in {0} seconds',
   'installer.step10.installTime.minutes':'Install and start completed in {0} minutes and
{1} seconds',
+  'installer.step11.header':'Prerequisites',
 
   'installer.stackUpgrade.header':'Stack Upgrade Wizard',
   'installer.stackUpgrade.step1.newVersion':'New Version',
@@ -621,6 +622,7 @@ Em.I18n.translations = {
   'services.service.config.failSaveConfig':'Failure in applying service configuration',
 
   'services.add.header':'Add Service Wizard',
+  'services.reassign.header':'Reassign Master Wizard',
   'services.service.add':'Add Service',
 
 

Modified: incubator/ambari/trunk/ambari-web/app/router.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/router.js?rev=1449226&r1=1449225&r2=1449226&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/router.js (original)
+++ incubator/ambari/trunk/ambari-web/app/router.js Fri Feb 22 21:39:46 2013
@@ -39,6 +39,7 @@ App.Router = Em.Router.extend({
     this.get('addHostController').clear();
     this.get('addServiceController').clear();
     this.get('stackUpgradeController').clear();
+    this.get('reassignMasterController').clear();
     for (i = 1; i < 11; i++) {
       this.set('wizardStep' + i + 'Controller.hasSubmitted', false);
       this.set('wizardStep' + i + 'Controller.isDisabled', true);

Modified: incubator/ambari/trunk/ambari-web/app/routes/main.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/routes/main.js?rev=1449226&r1=1449225&r2=1449226&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/routes/main.js (original)
+++ incubator/ambari/trunk/ambari-web/app/routes/main.js Fri Feb 22 21:39:46 2013
@@ -355,6 +355,8 @@ module.exports = Em.Route.extend({
   }),
 
   serviceAdd:require('routes/add_service_routes'),
+  reassignMaster:require('routes/reassign_master_routes'),
+
 
   selectService:Em.Route.transitionTo('services.service'),
   selectHost:function (router, event) {

Added: incubator/ambari/trunk/ambari-web/app/routes/reassign_master_routes.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/routes/reassign_master_routes.js?rev=1449226&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/routes/reassign_master_routes.js (added)
+++ incubator/ambari/trunk/ambari-web/app/routes/reassign_master_routes.js Fri Feb 22 21:39:46
2013
@@ -0,0 +1,88 @@
+/**
+ * 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.
+ */
+
+module.exports = Em.Route.extend({
+  route: '/services/reassign',
+
+  enter: function (router) {
+    console.log('in /service/reassign:enter');
+      Em.run.next(function () {
+        var reassignMasterController = router.get('reassignMasterController');
+        App.router.get('updateController').set('isWorking', false);
+        App.ModalPopup.show({
+          classNames: ['full-width-modal'],
+          header:Em.I18n.t('services.reassign.header'),
+          bodyClass:  App.ReassignMasterView.extend({
+            controller: reassignMasterController
+          }),
+          primary:Em.I18n.t('form.cancel'),
+          showFooter: false,
+          secondary: null,
+
+          onPrimary:function () {
+            this.hide();
+            App.router.get('updateController').set('isWorking', true);
+            App.router.transitionTo('main.services');
+          },
+          onClose: function() {
+            this.hide();
+            App.router.get('updateController').set('isWorking', true);
+            App.router.transitionTo('main.services')
+          },
+          didInsertElement: function(){
+            this.fitHeight();
+          }
+        });
+        router.transitionTo('step' + reassignMasterController.get('currentStep'));
+      });
+  },
+
+  step1: Em.Route.extend({
+    route: '/step1',
+    connectOutlets: function (router) {
+      console.log('in reassignMaster.step1:connectOutlets');
+      var controller = router.get('reassignMasterController');
+      controller.setCurrentStep('1');
+      controller.dataLoading().done(function () {
+        controller.loadAllPriorSteps();
+        controller.connectOutlet('wizardStep11');
+      })
+    },
+    next: function (router) {
+      //router.transitionTo('step2');
+    }
+  }),
+
+  gotoStep1: Em.Router.transitionTo('step1'),
+
+  gotoStep2: Em.Router.transitionTo('step2'),
+
+  gotoStep3: Em.Router.transitionTo('step3'),
+
+  gotoStep4: Em.Router.transitionTo('step4'),
+
+  gotoStep5: Em.Router.transitionTo('step5'),
+
+  gotoStep6: Em.Router.transitionTo('step6'),
+
+  backToServices: function (router) {
+    App.router.get('updateController').set('isWorking', true);
+    router.transitionTo('services');
+  }
+
+});

Modified: incubator/ambari/trunk/ambari-web/app/styles/application.less
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/styles/application.less?rev=1449226&r1=1449225&r2=1449226&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/styles/application.less (original)
+++ incubator/ambari/trunk/ambari-web/app/styles/application.less Fri Feb 22 21:39:46 2013
@@ -253,7 +253,7 @@ h1 {
   border-left-color: #dedede;
 }
 
-#installer, #add-host, #add-service {
+.wizard {
   h2 {
     margin-top: 0;
   }
@@ -263,7 +263,7 @@ h1 {
   .btn-area {
     margin-top: 20px;
   }
-  #installer-content, #add-host-content, #add-service-content {
+  .wizard-content {
     padding: 25px;
     background-color: #fff;
 

Modified: incubator/ambari/trunk/ambari-web/app/templates/installer.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/installer.hbs?rev=1449226&r1=1449225&r2=1449226&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/installer.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/installer.hbs Fri Feb 22 21:39:46 2013
@@ -16,7 +16,7 @@
 * limitations under the License.
 }}
 
-<div id="installer">
+<div class="wizard">
   <div class="container">
     <div class="container-fluid">
       <div class="row-fluid">
@@ -38,7 +38,7 @@
             </ul>
           </div>
         </div>
-        <div id="installer-content" class="well span9">
+        <div class="wizard-content well span9">
           {{outlet}}
         </div>
       </div>

Modified: incubator/ambari/trunk/ambari-web/app/templates/main/host/add.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/host/add.hbs?rev=1449226&r1=1449225&r2=1449226&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/host/add.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/host/add.hbs Fri Feb 22 21:39:46
2013
@@ -16,7 +16,7 @@
 * limitations under the License.
 }}
 
-<div id="add-host">
+<div class="wizard">
   <div class="container">
     <div class="container-fluid">
 
@@ -37,7 +37,7 @@
             </ul>
           </div>
         </div>
-        <div id="add-host-content" class="well span9">
+        <div class="wizard-content well span9">
           {{outlet}}
         </div>
       </div>

Modified: incubator/ambari/trunk/ambari-web/app/templates/main/service/add.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/service/add.hbs?rev=1449226&r1=1449225&r2=1449226&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/service/add.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/service/add.hbs Fri Feb 22 21:39:46
2013
@@ -16,7 +16,7 @@
 * limitations under the License.
 }}
 
-<div id="add-service">
+<div class="wizard">
   <div class="container">
     <div class="container-fluid">
 
@@ -38,7 +38,7 @@
             </ul>
           </div>
         </div>
-        <div id="add-service-content" class="well span9">
+        <div class="wizard-content well span9">
           {{outlet}}
         </div>
       </div>

Added: incubator/ambari/trunk/ambari-web/app/templates/main/service/reassign.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/service/reassign.hbs?rev=1449226&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/service/reassign.hbs (added)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/service/reassign.hbs Fri Feb 22 21:39:46
2013
@@ -0,0 +1,38 @@
+{{!
+* 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.
+}}
+
+<div class="wizard">
+  <div class="container">
+    <div class="container-fluid">
+      <div class="row-fluid">
+        <div class="span3">
+          <!--Sidebar content-->
+          <div class="well">
+            <ul class="nav nav-pills nav-stacked">
+              <li class="nav-header">{{t services.reassign.header}}</li>
+              <li {{bindAttr class="isStep1:active view.isStep1Disabled:disabled"}}><a
href="javascript:void(null);"  {{action gotoStep1 target="controller"}}>{{t installer.step11.header}}</a></li>
+            </ul>
+          </div>
+        </div>
+        <div class="wizard-content well span9">
+          {{outlet}}
+        </div>
+      </div>
+    </div>
+  </div>
+</div>

Added: incubator/ambari/trunk/ambari-web/app/templates/wizard/step11.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/wizard/step11.hbs?rev=1449226&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/wizard/step11.hbs (added)
+++ incubator/ambari/trunk/ambari-web/app/templates/wizard/step11.hbs Fri Feb 22 21:39:46
2013
@@ -0,0 +1,22 @@
+{{!
+* 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.step11.header}}</h2>
+<div class="btn-area">
+  <a class="btn btn-success pull-right" {{bindAttr disabled="isSubmitDisabled"}} {{action
next}}>{{t common.next}} &rarr;</a>
+</div>

Modified: incubator/ambari/trunk/ambari-web/app/utils/db.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/utils/db.js?rev=1449226&r1=1449225&r2=1449226&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/utils/db.js (original)
+++ incubator/ambari/trunk/ambari-web/app/utils/db.js Fri Feb 22 21:39:46 2013
@@ -54,7 +54,8 @@ App.db.cleanUp = function () {
     'Installer' : {},
     'AddHost' : {},
     'AddService' : {},
-    'StackUpgrade' : {}
+    'StackUpgrade' : {},
+    'ReassignMaster' : {}
   };
   console.log("In cleanup./..");
   localStorage.setObject('ambari', App.db.data);
@@ -220,6 +221,12 @@ App.db.setUpgradeOptions = function (upg
   localStorage.setObject('ambari', App.db.data);
 };
 
+App.db.setMasterToReassign = function (masterComponent) {
+  App.db.data = localStorage.getObject('ambari');
+  App.db.data.ReassignMaster.masterComponent = masterComponent;
+  localStorage.setObject('ambari', App.db.data);
+};
+
 /**
  * Set current step value for specified Wizard Type
  * @param wizardType
@@ -364,6 +371,11 @@ App.db.getCluster = function () {
   return App.db.data.Installer.clusterStatus;
 };
 
+App.db.getMasterToReassign = function () {
+  App.db.data = localStorage.getObject('ambari');
+  return App.db.data.ReassignMaster.masterComponent;
+};
+
 App.db.getUpgradeOptions = function () {
   console.log('TRACE: Entering db:getUpgradeOptions function');
   App.db.data = localStorage.getObject('ambari');

Modified: incubator/ambari/trunk/ambari-web/app/views.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views.js?rev=1449226&r1=1449225&r2=1449226&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views.js Fri Feb 22 21:39:46 2013
@@ -100,6 +100,7 @@ require('views/main/service/info/metrics
 require('views/main/service/info/metrics/hbase/hlog_split_time');
 require('views/main/service/info/metrics/hbase/hlog_split_size');
 require('views/main/service/add_view');
+require('views/main/service/reassign_view');
 require('views/main/charts/menu');
 require('views/main/charts/heatmap');
 require('views/main/charts/heatmap/heatmap_rack');
@@ -121,6 +122,7 @@ require('views/wizard/step7_view');
 require('views/wizard/step8_view');
 require('views/wizard/step9_view');
 require('views/wizard/step10_view');
+require('views/wizard/step11_view');
 require('views/wizard/stack_upgrade/step1_view');
 require('views/wizard/stack_upgrade/step2_view');
 require('views/loading');

Added: incubator/ambari/trunk/ambari-web/app/views/main/service/reassign_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/reassign_view.js?rev=1449226&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/reassign_view.js (added)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/reassign_view.js Fri Feb 22 21:39:46
2013
@@ -0,0 +1,54 @@
+/**
+ * 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.ReassignMasterView = Em.View.extend({
+
+  templateName: require('templates/main/service/reassign'),
+
+  isStep1Disabled: function () {
+    return this.isStepDisabled(1);
+  }.property('controller.isStepDisabled.@each.value').cacheable(),
+
+  isStep2Disabled: function () {
+    return this.isStepDisabled(2);
+  }.property('controller.isStepDisabled.@each.value').cacheable(),
+
+  isStep3Disabled: function () {
+    return this.isStepDisabled(3);
+  }.property('controller.isStepDisabled.@each.value').cacheable(),
+
+  isStep4Disabled: function () {
+    return this.isStepDisabled(4);
+  }.property('controller.isStepDisabled.@each.value').cacheable(),
+
+  isStep5Disabled: function () {
+    return this.isStepDisabled(5);
+  }.property('controller.isStepDisabled.@each.value').cacheable(),
+
+  isStep6Disabled: function () {
+    return this.isStepDisabled(6);
+  }.property('controller.isStepDisabled.@each.value').cacheable(),
+
+  isStepDisabled: function (index) {
+    return this.get('controller.isStepDisabled').findProperty('step', index).get('value');
+  }
+
+});

Added: incubator/ambari/trunk/ambari-web/app/views/wizard/step11_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/wizard/step11_view.js?rev=1449226&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/wizard/step11_view.js (added)
+++ incubator/ambari/trunk/ambari-web/app/views/wizard/step11_view.js Fri Feb 22 21:39:46
2013
@@ -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.
+ */
+
+
+var App = require('app');
+
+App.WizardStep11View = Em.View.extend({
+
+  templateName: require('templates/wizard/step11')
+
+});



Mime
View raw message