Author: yusaku
Date: Fri Feb 22 21:37:02 2013
New Revision: 1449223
URL: http://svn.apache.org/r1449223
Log:
AMBARI-1481. Stack Upgrade Wizard - Step 2 (confirm and check all master
components are running). (yusaku)
Added:
incubator/ambari/trunk/ambari-web/app/controllers/wizard/stack_upgrade/step2_controller.js
incubator/ambari/trunk/ambari-web/app/templates/wizard/stack_upgrade/step2.hbs
incubator/ambari/trunk/ambari-web/app/views/wizard/stack_upgrade/step2_view.js
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-web/app/assets/data/wizard/stack/stacks.json
incubator/ambari/trunk/ambari-web/app/controllers.js
incubator/ambari/trunk/ambari-web/app/controllers/main/admin/cluster.js
incubator/ambari/trunk/ambari-web/app/controllers/main/admin/stack_upgrade_controller.js
incubator/ambari/trunk/ambari-web/app/controllers/wizard.js
incubator/ambari/trunk/ambari-web/app/messages.js
incubator/ambari/trunk/ambari-web/app/router.js
incubator/ambari/trunk/ambari-web/app/routes/stack_upgrade.js
incubator/ambari/trunk/ambari-web/app/styles/application.less
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=1449223&r1=1449222&r2=1449223&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Fri Feb 22 21:37:02 2013
@@ -12,6 +12,9 @@ Trunk (unreleased changes):
NEW FEATURES
+ AMBARI-1481. Stack Upgrade Wizard - Step 2 (confirm and check all master
+ components are running). (yusaku)
+
AMBARI-1469. Allow user to add multiple HBase masters in Install Wizard.
(yusaku)
Modified:
incubator/ambari/trunk/ambari-web/app/assets/data/wizard/stack/stacks.json
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/assets/data/wizard/stack/stacks.json?rev=1449223&r1=1449222&r2=1449223&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/assets/data/wizard/stack/stacks.json
(original)
+++ incubator/ambari/trunk/ambari-web/app/assets/data/wizard/stack/stacks.json
Fri Feb 22 21:37:02 2013
@@ -721,11 +721,11 @@
} ]
}, {
"name" : "HDP",
- "version" : "1.2.0",
+ "version" : "1.3.0",
"repositories" : [ {
- "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.2.0/repos/centos6",
+ "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.3.0/repos/centos6",
"osType" : "centos6",
- "repoId" : "HDP-1.2.0",
+ "repoId" : "HDP-1.3.0",
"repoName" : "HDP",
"mirrorsList" : null
}, {
@@ -735,9 +735,9 @@
"repoName" : "HDP-epel",
"mirrorsList" :
"http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=$basearch"
}, {
- "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.2.0/repos/centos5",
+ "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.3.0/repos/centos5",
"osType" : "centos5",
- "repoId" : "HDP-1.2.0",
+ "repoId" : "HDP-1.3.0",
"repoName" : "HDP",
"mirrorsList" : null
}, {
@@ -747,9 +747,9 @@
"repoName" : "HDP-epel",
"mirrorsList" :
"http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch"
}, {
- "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.2.0/repos/centos6",
+ "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.3.0/repos/centos6",
"osType" : "redhat6",
- "repoId" : "HDP-1.2.0",
+ "repoId" : "HDP-1.3.0",
"repoName" : "HDP",
"mirrorsList" : null
}, {
@@ -759,9 +759,9 @@
"repoName" : "HDP-epel",
"mirrorsList" :
"http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=$basearch"
}, {
- "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.2.0/repos/centos5",
+ "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.3.0/repos/centos5",
"osType" : "redhat5",
- "repoId" : "HDP-1.2.0",
+ "repoId" : "HDP-1.3.0",
"repoName" : "HDP",
"mirrorsList" : null
}, {
@@ -771,9 +771,9 @@
"repoName" : "HDP-epel",
"mirrorsList" :
"http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch"
}, {
- "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.2.0/repos/suse11",
+ "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.3.0/repos/suse11",
"osType" : "suse11",
- "repoId" : "HDP-1.2.0",
+ "repoId" : "HDP-1.3.0",
"repoName" : "HDP",
"mirrorsList" : null
}, {
@@ -783,9 +783,9 @@
"repoName" : "HDP-UTILS",
"mirrorsList" : null
}, {
- "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.2.0/repos/suse11",
+ "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.3.0/repos/suse11",
"osType" : "sles11",
- "repoId" : "HDP-1.2.0",
+ "repoId" : "HDP-1.3.0",
"repoName" : "HDP",
"mirrorsList" : null
}, {
@@ -1447,11 +1447,11 @@
} ]
}, {
"name" : "HDPLocal",
- "version" : "1.2.0",
+ "version" : "1.3.0",
"repositories" : [ {
- "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.2.0/repos/centos6",
+ "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.3.0/repos/centos6",
"osType" : "centos6",
- "repoId" : "HDP-1.2.0",
+ "repoId" : "HDP-1.3.0",
"repoName" : "HDP",
"mirrorsList" : null
}, {
@@ -1461,9 +1461,9 @@
"repoName" : "HDP-epel",
"mirrorsList" :
"http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=$basearch"
}, {
- "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.2.0/repos/centos5",
+ "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.3.0/repos/centos5",
"osType" : "centos5",
- "repoId" : "HDP-1.2.0",
+ "repoId" : "HDP-1.3.0",
"repoName" : "HDP",
"mirrorsList" : null
}, {
@@ -1473,9 +1473,9 @@
"repoName" : "HDP-epel",
"mirrorsList" :
"http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch"
}, {
- "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.2.0/repos/centos6",
+ "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.3.0/repos/centos6",
"osType" : "redhat6",
- "repoId" : "HDP-1.2.0",
+ "repoId" : "HDP-1.3.0",
"repoName" : "HDP",
"mirrorsList" : null
}, {
@@ -1485,9 +1485,9 @@
"repoName" : "HDP-epel",
"mirrorsList" :
"http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=$basearch"
}, {
- "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.2.0/repos/centos5",
+ "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.3.0/repos/centos5",
"osType" : "redhat5",
- "repoId" : "HDP-1.2.0",
+ "repoId" : "HDP-1.3.0",
"repoName" : "HDP",
"mirrorsList" : null
}, {
@@ -1497,9 +1497,9 @@
"repoName" : "HDP-epel",
"mirrorsList" :
"http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch"
}, {
- "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.2.0/repos/suse11",
+ "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.3.0/repos/suse11",
"osType" : "suse11",
- "repoId" : "HDP-1.2.0",
+ "repoId" : "HDP-1.3.0",
"repoName" : "HDP",
"mirrorsList" : null
}, {
@@ -1509,9 +1509,9 @@
"repoName" : "HDP-UTILS",
"mirrorsList" : null
}, {
- "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.2.0/repos/suse11",
+ "baseUrl" : "http://public-repo-1.hortonworks.com/HDP-1.3.0/repos/suse11",
"osType" : "sles11",
- "repoId" : "HDP-1.2.0",
+ "repoId" : "HDP-1.3.0",
"repoName" : "HDP",
"mirrorsList" : null
}, {
Modified: incubator/ambari/trunk/ambari-web/app/controllers.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers.js?rev=1449223&r1=1449222&r2=1449223&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers.js Fri Feb 22 21:37:02
2013
@@ -72,5 +72,6 @@ require('controllers/wizard/step8_contro
require('controllers/wizard/step9_controller');
require('controllers/wizard/step10_controller');
require('controllers/wizard/stack_upgrade/step1_controller');
+require('controllers/wizard/stack_upgrade/step2_controller');
require('controllers/global/cluster_controller');
require('controllers/global/update_controller');
\ No newline at end of file
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/main/admin/cluster.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/admin/cluster.js?rev=1449223&r1=1449222&r2=1449223&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/admin/cluster.js
(original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/admin/cluster.js Fri
Feb 22 21:37:02 2013
@@ -33,8 +33,8 @@ App.MainAdminClusterController = Em.Cont
'/data/wizard/stack/stacks.json'
);
var upgradeVersion = this.get('upgradeVersion') ||
App.defaultStackVersion;
- var installedServices = [];
- var newServices = [];
+ var installedServices = {};
+ var newServices = {};
$.ajax({
type: "GET",
url: url,
@@ -66,26 +66,28 @@ App.MainAdminClusterController = Em.Cont
var result = [];
var installedServices = App.Service.find().mapProperty('serviceName');
var displayOrderConfig = require('data/services');
- // loop through all the service components
- for (var i = 0; i < displayOrderConfig.length; i++) {
- var entry = oldServices.services.findProperty("name",
displayOrderConfig[i].serviceName);
- if (installedServices.contains(entry.name)) {
- var myService = Em.Object.create({
- serviceName: entry.name,
- displayName: displayOrderConfig[i].displayName,
- isDisabled: i === 0,
- isSelected: true,
- isInstalled: false,
- isHidden: displayOrderConfig[i].isHidden,
- description: entry.comment,
- version: entry.version,
- newVersion: newServices.services.findProperty("name",
displayOrderConfig[i].serviceName).version
- });
- //From 1.3.0 for Hive we display only "Hive" (but it installes HCat
and WebHCat as well)
- if (this.get('upgradeVersion').replace(/HDP-/, '') >= '1.3.0' &&
displayOrderConfig[i].serviceName == 'HIVE') {
- myService.set('displayName', 'Hive');
+ if(oldServices.services && newServices.services){
+ // loop through all the service components
+ for (var i = 0; i < displayOrderConfig.length; i++) {
+ var entry = oldServices.services.findProperty("name",
displayOrderConfig[i].serviceName);
+ if (installedServices.contains(entry.name)) {
+ var myService = Em.Object.create({
+ serviceName: entry.name,
+ displayName: displayOrderConfig[i].displayName,
+ isDisabled: i === 0,
+ isSelected: true,
+ isInstalled: false,
+ isHidden: displayOrderConfig[i].isHidden,
+ description: entry.comment,
+ version: entry.version,
+ newVersion: newServices.services.findProperty("name",
displayOrderConfig[i].serviceName).version
+ });
+ //From 1.3.0 for Hive we display only "Hive" (but it installes HCat
and WebHCat as well)
+ if (this.get('upgradeVersion').replace(/HDP-/, '') >= '1.3.0' &&
displayOrderConfig[i].serviceName == 'HIVE') {
+ myService.set('displayName', 'Hive');
+ }
+ result.push(myService);
}
- result.push(myService);
}
}
this.set('services', result);
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/main/admin/stack_upgrade_controller.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/admin/stack_upgrade_controller.js?rev=1449223&r1=1449222&r2=1449223&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/controllers/main/admin/stack_upgrade_controller.js
(original)
+++
incubator/ambari/trunk/ambari-web/app/controllers/main/admin/stack_upgrade_controller.js
Fri Feb 22 21:37:02 2013
@@ -51,12 +51,36 @@ App.StackUpgradeController = App.WizardC
return jQuery.extend({}, this.get('clusterStatusTemplate'), {name:
App.get('ClusterName')});
},
/**
+ * return new object extended from upgradeOptionsTemplate
+ * @return Object
+ */
+ getUpgradeOptions: function(){
+ return jQuery.extend({}, this.get('upgradeOptionsTemplate'));
+ },
+ /**
* Load data for all steps until <code>current step</code>
*/
loadAllPriorSteps: function () {
this.load('cluster');
+ this.load('upgradeOptions');
+ },
+ upgradeOptionsTemplate:{
+ localRepo: false
+ },
+ clear: function () {
+ this.set('content', Ember.Object.create({
+ servicesInfo: function(){
+ return App.router.get('mainAdminClusterController.services');
+ }.property('App.router.mainAdminClusterController.services'),
+ upgradeVersion: function(){
+ return App.router.get('mainAdminClusterController.upgradeVersion');
+ }.property('App.router.mainAdminClusterController.upgradeVersion'),
+ 'controllerName': this.get('content.controllerName'),
+ 'isWizard': !(this.get('content.controllerName') ===
'installerController')
+ }));
+ this.set('currentStep', 0);
+ this.clearStorageData();
},
-
/**
* Finish upgrade
*/
Modified: incubator/ambari/trunk/ambari-web/app/controllers/wizard.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard.js?rev=1449223&r1=1449222&r2=1449223&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/wizard.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/wizard.js Fri Feb 22
21:37:02 2013
@@ -421,6 +421,7 @@ App.WizardController = Em.Controller.ext
App.db.setSlaveProperties(undefined);
App.db.setInstallOptions(undefined);
App.db.setAllHostNamesPattern(undefined);
+ App.db.setUpgradeOptions(undefined);
},
installOptionsTemplate: {
Added:
incubator/ambari/trunk/ambari-web/app/controllers/wizard/stack_upgrade/step2_controller.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/stack_upgrade/step2_controller.js?rev=1449223&view=auto
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/controllers/wizard/stack_upgrade/step2_controller.js
(added)
+++
incubator/ambari/trunk/ambari-web/app/controllers/wizard/stack_upgrade/step2_controller.js
Fri Feb 22 21:37:02 2013
@@ -0,0 +1,58 @@
+/**
+ * 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.StackUpgradeStep2Controller = Em.Controller.extend({
+ name: 'stackUpgradeStep2Controller',
+ /**
+ * check whether all services are running
+ * @return {Array}
+ */
+ isAllServicesRunning:function(){
+ var masterComponents = App.HostComponent.find().filterProperty('isMaster',
true);
+ return masterComponents.everyProperty('workStatus', 'STARTED');
+ },
+ /**
+ * callback, which save step data and route to next step
+ * @param event
+ */
+ upgradeAction: function(event){
+ if(this.get('isAllServicesRunning')){
+ App.db.setUpgradeOptions(this.get('content.upgradeOptions'));
+ App.router.send('next');
+ } else {
+ this.showWarningPopup();
+ }
+ },
+ /**
+ * show warning popup if not all services are running
+ */
+ showWarningPopup: function(){
+ App.ModalPopup.show({
+ header: Em.I18n.t('installer.step2.manualInstall.popup.header'),
+ onPrimary: function () {
+ this.hide();
+ },
+ secondary: null,
+ bodyClass: Ember.View.extend({
+ template: Em.Handlebars.compile('{{t
installer.stackUpgrade.step2.popup.body}}')
+ })
+ });
+ }
+});
Modified: incubator/ambari/trunk/ambari-web/app/messages.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/messages.js?rev=1449223&r1=1449222&r2=1449223&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/messages.js (original)
+++ incubator/ambari/trunk/ambari-web/app/messages.js Fri Feb 22 21:37:02 2013
@@ -396,6 +396,15 @@ Em.I18n.translations = {
'installer.stackUpgrade.step1.upgradeStackVersion':'Upgrade stack version',
'installer.stackUpgrade.step1.description':'This Stack Upgrade Wizard will
walk you through the steps of upgrading the cluster to the latest available
stack version.',
+ 'installer.stackUpgrade.step2.notice.header':'Important before you proceed,
please perform following.',
+ 'installer.stackUpgrade.step2.notice.first':'Make sure that your NameNode is
backed up.',
+ 'installer.stackUpgrade.step2.notice.second':'Make sure that your NameNode
is backed up.',
+ 'installer.stackUpgrade.step2.notice.third':'Make sure that your NameNode is
backed up.',
+ 'installer.stackUpgrade.step2.notice.complete':'Once you have completed the
above, click on Upgrade to initiate the upgrade process on all hosts in your
cluster',
+ 'installer.stackUpgrade.step2.advancedOption':'Advanced Option',
+ 'installer.stackUpgrade.step2.localRepository':'Use a local repository',
+ 'installer.stackUpgrade.step2.popup.body':'We cannot proceed since some of
the master components are not currently running. Please ensure that all
services are running before continuing.',
+
'form.create':'Create',
'form.save':'Save',
'form.cancel':'Cancel',
Modified: incubator/ambari/trunk/ambari-web/app/router.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/router.js?rev=1449223&r1=1449222&r2=1449223&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/router.js (original)
+++ incubator/ambari/trunk/ambari-web/app/router.js Fri Feb 22 21:37:02 2013
@@ -262,6 +262,9 @@ App.Router = Em.Router.extend({
} else if (clusterStatusOnServer &&
clusterStatusOnServer.wizardControllerName ===
App.router.get('addHostController.name')) {
// if wizardControllerName == "addHostController", then it means someone
closed the browser or the browser was crashed when we were last in Add Hosts
wizard
return 'main.hostAdd';
+ } else if (clusterStatusOnServer &&
clusterStatusOnServer.wizardControllerName ===
App.router.get('stackUpgradeController.name')) {
+ // if wizardControllerName == "stackUpgradeController", then it means
someone closed the browser or the browser was crashed when we were last in
Stack Upgrade wizard
+ return 'main.stackUpgrade';
} else {
// if wizardControllerName == "installerController", then it means
someone closed the browser or the browser was crashed when we were last in
Installer wizard
return 'installer';
Modified: incubator/ambari/trunk/ambari-web/app/routes/stack_upgrade.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/routes/stack_upgrade.js?rev=1449223&r1=1449222&r2=1449223&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/routes/stack_upgrade.js (original)
+++ incubator/ambari/trunk/ambari-web/app/routes/stack_upgrade.js Fri Feb 22
21:37:02 2013
@@ -71,9 +71,7 @@ module.exports = Em.Route.extend({
controller.loadAllPriorSteps();
controller.connectOutlet('stackUpgradeStep1', controller.get('content'));
},
- next: function(router){
- //Em.Router.transitionTo('step2');
- }
+ next: Em.Router.transitionTo('step2')
}),
step2: Em.Route.extend({
@@ -82,11 +80,18 @@ module.exports = Em.Route.extend({
console.log('in stackUpgrade.step2:connectOutlets');
var controller = router.get('stackUpgradeController');
controller.setCurrentStep('2');
+ controller.loadAllPriorSteps();
controller.connectOutlet('stackUpgradeStep2', controller.get('content'));
},
back: Em.Router.transitionTo('step1'),
- next: function (router, context) {
- router.transitionTo('step3');
+ next: function(router){
+ /*router.transitionTo('step3');
+ App.clusterStatus.setClusterStatus({
+ clusterName: this.get('clusterName'),
+ clusterState: 'UPGRADING_STACK',
+ wizardControllerName: 'stackUpgradeController',
+ localdb: App.db.data
+ });*/
}
}),
@@ -97,10 +102,12 @@ module.exports = Em.Route.extend({
var controller = router.get('stackUpgradeController');
controller.setCurrentStep('3');
controller.setLowerStepsDisable(3);
+ controller.loadAllPriorSteps();
controller.connectOutlet('stackUpgradeStep3', controller.get('content'));
},
- back: Em.Router.transitionTo('step2'),
- complete: function (router, context) {
+ retry: function(router){
+ },
+ done: function (router, context) {
App.router.get('updateController').set('isWorking', true);
$(context.currentTarget).parents("#modal").find(".close").trigger('click');
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=1449223&r1=1449222&r2=1449223&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:37:02 2013
@@ -406,6 +406,9 @@ h1 {
table th {
vertical-align: middle;
}
+ .btn-area {
+ margin-top: 30px;
+ }
}
#host-log {
Added:
incubator/ambari/trunk/ambari-web/app/templates/wizard/stack_upgrade/step2.hbs
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/wizard/stack_upgrade/step2.hbs?rev=1449223&view=auto
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/templates/wizard/stack_upgrade/step2.hbs
(added)
+++
incubator/ambari/trunk/ambari-web/app/templates/wizard/stack_upgrade/step2.hbs
Fri Feb 22 21:37:02 2013
@@ -0,0 +1,49 @@
+{{!
+* 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="box alert-info">
+ <div>
+ {{t installer.stackUpgrade.step2.notice.header}}
+ </div>
+ <br/>
+ <ul class="unstyled">
+ <li>1) {{t installer.stackUpgrade.step2.notice.first}}</li>
+ <li>2) {{t installer.stackUpgrade.step2.notice.second}}</li>
+ <li>3) {{t installer.stackUpgrade.step2.notice.third}}</li>
+ </ul>
+ <div>
+ <strong>{{t installer.stackUpgrade.step2.notice.complete}}</strong>
+ </div>
+</div>
+<div class="control-group">
+ <label><strong>
+ {{t installer.stackUpgrade.step2.advancedOption}}
+ <i href="javascript:void(null)" class="icon-question-sign"
+ rel="popover"
+ {{translateAttr title="installer.step2.localRepo.tooltip.title"
data-content="installer.step2.localRepo.tooltip.content"}}>
+ </i>
+ </strong></label>
+ <label class="checkbox">
+ {{view Ember.Checkbox checkedBinding="content.upgradeOptions.localRepo"}}
+ {{t installer.stackUpgrade.step2.localRepository}}
+ </label>
+</div>
+<div class="btn-area">
+ <a class="btn pull-left" {{action back}}>{{t common.back}}</a>
+ <a class="btn btn-success pull-right" {{action upgradeAction
target="controller"}}>{{t common.upgrade}}</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=1449223&r1=1449222&r2=1449223&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:37:02 2013
@@ -213,6 +213,13 @@ App.db.setCluster = function (status) {
localStorage.setObject('ambari', App.db.data);
};
+App.db.setUpgradeOptions = function (upgradeOptions) {
+ App.db.data = localStorage.getObject('ambari');
+ App.db.data.StackUpgrade.upgradeOptions = upgradeOptions;
+ console.log('db.setUpgradeOptions called: ' +
JSON.stringify(upgradeOptions));
+ localStorage.setObject('ambari', App.db.data);
+};
+
/**
* Set current step value for specified Wizard Type
* @param wizardType
@@ -357,4 +364,10 @@ App.db.getCluster = function () {
return App.db.data.Installer.clusterStatus;
};
+App.db.getUpgradeOptions = function () {
+ console.log('TRACE: Entering db:getUpgradeOptions function');
+ App.db.data = localStorage.getObject('ambari');
+ return App.db.data.StackUpgrade.upgradeOptions;
+};
+
module.exports = App.db;
Modified: incubator/ambari/trunk/ambari-web/app/views.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views.js?rev=1449223&r1=1449222&r2=1449223&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views.js Fri Feb 22 21:37:02 2013
@@ -122,4 +122,5 @@ require('views/wizard/step8_view');
require('views/wizard/step9_view');
require('views/wizard/step10_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/wizard/stack_upgrade/step2_view.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/wizard/stack_upgrade/step2_view.js?rev=1449223&view=auto
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/views/wizard/stack_upgrade/step2_view.js
(added)
+++
incubator/ambari/trunk/ambari-web/app/views/wizard/stack_upgrade/step2_view.js
Fri Feb 22 21:37:02 2013
@@ -0,0 +1,27 @@
+/**
+ * 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.StackUpgradeStep2View = Em.View.extend({
+ templateName: require('templates/wizard/stack_upgrade/step2'),
+ didInsertElement: function(){
+ $("[rel=popover]").popover({'placement': 'right', 'trigger': 'hover'});
+ }
+});