You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/08/06 22:59:53 UTC
git commit: AMBARI-2818. NameNode HA Wizard: "Create Checkpoint"
page. (Antonenko Alexander via yusaku)
Updated Branches:
refs/heads/trunk 915f74b29 -> 938878647
AMBARI-2818. NameNode HA Wizard: "Create Checkpoint" page. (Antonenko Alexander via yusaku)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/93887864
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/93887864
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/93887864
Branch: refs/heads/trunk
Commit: 93887864704475d35ac574c344c2904a87a964ea
Parents: 915f74b
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Tue Aug 6 13:59:46 2013 -0700
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Tue Aug 6 13:59:46 2013 -0700
----------------------------------------------------------------------
ambari-web/app/controllers.js | 1 +
.../highAvailability/progress_controller.js | 2 +-
.../admin/highAvailability/step4_controller.js | 54 ++------------
.../admin/highAvailability/step5_controller.js | 74 ++++++++++++++++++++
.../admin/highAvailability/wizard_controller.js | 3 +-
ambari-web/app/messages.js | 52 +++++---------
.../app/routes/high_availability_routes.js | 24 ++++++-
ambari-web/app/styles/application.less | 4 ++
.../main/admin/highAvailability/step4.hbs | 26 ++-----
.../main/admin/highAvailability/step5.hbs | 41 +++++++++++
.../main/admin/highAvailability/wizard.hbs | 1 +
ambari-web/app/views.js | 1 +
.../main/admin/highAvailability/step4_view.js | 40 ++---------
.../main/admin/highAvailability/step5_view.js | 62 ++++++++++++++++
.../main/admin/highAvailability/wizard_view.js | 4 ++
15 files changed, 246 insertions(+), 143 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/93887864/ambari-web/app/controllers.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers.js b/ambari-web/app/controllers.js
index e4fbbf5..ff38aaf 100644
--- a/ambari-web/app/controllers.js
+++ b/ambari-web/app/controllers.js
@@ -33,6 +33,7 @@ require('controllers/main/admin/highAvailability/step1_controller');
require('controllers/main/admin/highAvailability/step2_controller');
require('controllers/main/admin/highAvailability/step3_controller');
require('controllers/main/admin/highAvailability/step4_controller');
+require('controllers/main/admin/highAvailability/step5_controller');
require('controllers/main/admin/cluster');
require('controllers/main/admin/stack_upgrade_controller');
require('controllers/main/admin/user');
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/93887864/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js
index 6cb1048..72a4b32 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js
@@ -42,7 +42,7 @@ App.HighAvailabilityProgressPageController = Em.Controller.extend({
var commands = this.get('commands');
for (var i = 0; i < commands.length; i++) {
this.get('tasks').pushObject(Ember.Object.create({
- title: Em.I18n.t('admin.highAvailability.wizard.step4.task' + i + '.title'),
+ title: Em.I18n.t('admin.highAvailability.wizard.step5.task' + i + '.title'),
status: 'PENDING',
id: i,
command: commands[i]
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/93887864/ambari-web/app/controllers/main/admin/highAvailability/step4_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/step4_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/step4_controller.js
index 1fa3e48..6455ef8 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/step4_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/step4_controller.js
@@ -18,57 +18,11 @@
var App = require('app');
-App.HighAvailabilityWizardStep4Controller = App.HighAvailabilityProgressPageController.extend({
+require('controllers/main/admin/misc_controller');
- commands: ['stopAllServices', 'installNameNode', 'installJournalNode', 'startJournalNode', 'disableSNameNode', 'reconfigureHDFS'],
+App.HighAvailabilityWizardStep4Controller = App.MainAdminMiscController.extend({
- stopAllServices: function () {
- App.ajax.send({
- name: 'admin.high_availability.stop_all_services',
- sender: this,
- success: 'startPolling',
- error: 'onTaskError'
- });
- },
+ name:"highAvailabilityWizardStep4Controller"
- installNameNode: function () {
- var hostName = this.get('content.masterComponentHosts').findProperty('isAddNameNode').hostName;
- this.createComponent('NAMENODE', hostName);
- },
-
- installJournalNode: function () {
- var hostNames = this.get('content.masterComponentHosts').filterProperty('component', 'JOURNALNODE').mapProperty('hostName');
- this.createComponent('JOURNALNODE', hostNames);
- },
-
- startJournalNode: function () {
- var hostNames = this.get('content.masterComponentHosts').filterProperty('component', 'JOURNALNODE').mapProperty('hostName');
- this.startComponent('JOURNALNODE', hostNames);
- },
-
- disableSNameNode: function () {
- var hostName = this.get('content.masterComponentHosts').findProperty('component', 'SECONDARY_NAMENODE').hostName;
- App.ajax.send({
- name: 'admin.high_availability.maintenance_mode',
- sender: this,
- data: {
- hostName: hostName,
- componentName: 'SECONDARY_NAMENODE'
- },
- success: 'onTaskCompleted',
- error: 'onTaskError'
- });
- },
-
- reconfigureHDFS: function () {
- var hostNames = this.get('content.masterComponentHosts').filterProperty('component', 'NAMENODE').mapProperty('hostName');
- var params = {
- data: {
- hostName: hostNames,
- componentName: 'HDFS_CLIENT'
- }
- };
- this.installComponent(null, params);
- }
-});
+})
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/93887864/ambari-web/app/controllers/main/admin/highAvailability/step5_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/step5_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/step5_controller.js
new file mode 100644
index 0000000..305c45d
--- /dev/null
+++ b/ambari-web/app/controllers/main/admin/highAvailability/step5_controller.js
@@ -0,0 +1,74 @@
+/**
+ * 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.HighAvailabilityWizardStep5Controller = App.HighAvailabilityProgressPageController.extend({
+
+ commands: ['stopAllServices', 'installNameNode', 'installJournalNode', 'startJournalNode', 'disableSNameNode', 'reconfigureHDFS'],
+
+ stopAllServices: function () {
+ App.ajax.send({
+ name: 'admin.high_availability.stop_all_services',
+ sender: this,
+ success: 'startPolling',
+ error: 'onTaskError'
+ });
+ },
+
+ installNameNode: function () {
+ var hostName = this.get('content.masterComponentHosts').findProperty('isAddNameNode').hostName;
+ this.createComponent('NAMENODE', hostName);
+ },
+
+ installJournalNode: function () {
+ var hostNames = this.get('content.masterComponentHosts').filterProperty('component', 'JOURNALNODE').mapProperty('hostName');
+ this.createComponent('JOURNALNODE', hostNames);
+ },
+
+ startJournalNode: function () {
+ var hostNames = this.get('content.masterComponentHosts').filterProperty('component', 'JOURNALNODE').mapProperty('hostName');
+ this.startComponent('JOURNALNODE', hostNames);
+ },
+
+ disableSNameNode: function () {
+ var hostName = this.get('content.masterComponentHosts').findProperty('component', 'SECONDARY_NAMENODE').hostName;
+ App.ajax.send({
+ name: 'admin.high_availability.maintenance_mode',
+ sender: this,
+ data: {
+ hostName: hostName,
+ componentName: 'SECONDARY_NAMENODE'
+ },
+ success: 'onTaskCompleted',
+ error: 'onTaskError'
+ });
+ },
+
+ reconfigureHDFS: function () {
+ var hostNames = this.get('content.masterComponentHosts').filterProperty('component', 'NAMENODE').mapProperty('hostName');
+ var params = {
+ data: {
+ hostName: hostNames,
+ componentName: 'HDFS_CLIENT'
+ }
+ };
+ this.installComponent(null, params);
+ }
+});
+
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/93887864/ambari-web/app/controllers/main/admin/highAvailability/wizard_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/wizard_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/wizard_controller.js
index 2535171..6a79d39 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/wizard_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/wizard_controller.js
@@ -23,7 +23,7 @@ App.HighAvailabilityWizardController = App.WizardController.extend({
name: 'highAvailabilityWizardController',
- totalSteps: 4,
+ totalSteps: 5,
/**
* Used for hiding back button in wizard
@@ -163,6 +163,7 @@ App.HighAvailabilityWizardController = App.WizardController.extend({
loadAllPriorSteps: function () {
var step = this.get('currentStep');
switch (step) {
+ case '5':
case '4':
case '3':
case '2':
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/93887864/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 54c11b1..e271f31 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -644,20 +644,29 @@ Em.I18n.translations = {
'admin.highAvailability.wizard.step1.header':'Get Started',
'admin.highAvailability.wizard.step2.header':'Select Hosts',
'admin.highAvailability.wizard.step3.header':'Review',
- 'admin.highAvailability.wizard.step4.header':'Deploy',
- 'admin.highAvailability.wizard.step4.notice':'Please wait while NameNode HA is being deployed.',
- 'admin.highAvailability.wizard.step4.task0.title':'Stop all services',
- 'admin.highAvailability.wizard.step4.task1.title':'Install Additional NameNode',
- 'admin.highAvailability.wizard.step4.task2.title':'Install JournalNodes',
- 'admin.highAvailability.wizard.step4.task3.title':'Start JournalNodes',
- 'admin.highAvailability.wizard.step4.task4.title':'Disable Secondary NameNode',
- 'admin.highAvailability.wizard.step4.task5.title':'Reconfigure HDFS',
+ 'admin.highAvailability.wizard.step4.header':'Create Checkpoint',
+ 'admin.highAvailability.wizard.step5.header':'Deploy',
+
+ 'admin.highAvailability.wizard.step5.notice':'Please wait while NameNode HA is being deployed.',
+ 'admin.highAvailability.wizard.step5.task0.title':'Stop all services',
+ 'admin.highAvailability.wizard.step5.task1.title':'Install Additional NameNode',
+ 'admin.highAvailability.wizard.step5.task2.title':'Install JournalNodes',
+ 'admin.highAvailability.wizard.step5.task3.title':'Start JournalNodes',
+ 'admin.highAvailability.wizard.step5.task4.title':'Disable Secondary NameNode',
+ 'admin.highAvailability.wizard.step5.task5.title':'Reconfigure HDFS',
'admin.highAvailability.wizard.step3.nn1':'Current NameNode is on {0}.',
'admin.highAvailability.wizard.step3.nn2':'Additional NameNode will be installed on {0}.',
'admin.highAvailability.wizard.step3.sn':'Existing Secondary NameNode on {0} will be disabled.',
'admin.highAvailability.wizard.step3.jn':'JournalNode will be installed on following hosts:',
-
+ 'admin.highAvailability.wizard.step4.ckNotCreated':'Checkpoint not created yet',
+
+ 'admin.highAvailability.wizard.step4.body':'Note: The following commands must be run as the user {0} on {1} <br/>' +
+ '1. Put the NameNode in safe mode (read-only-mode) by running: <br/>' +
+ '$ hdfs dfsadmin -safemode enter <br/>' +
+ '2. Once NameNode is in Safe Mode, create a checkpoint by running: <br/>' +
+ '$ TDB COMMAND <br/>' +
+ '3. You will be able to proceed to the next step once we detect that the NameNode is in Safe Mode and that the checkpoint has been created successfully.',
'admin.highAvailability.wizard.step3.body':'Confirm your host selection and click Deploy to activate NameNode HA.',
'admin.highAvailability.wizard.step2.body':'Select a host that will be running an additional NameNode.<br/> In addition,' +
' select 3 hosts that will be running JournalNodes to store NameNode edit logs in a fault tolerant maner.',
@@ -910,25 +919,7 @@ Em.I18n.translations = {
'services.service.info.metrics.yarn.gc': 'Garbage Collection',
'services.service.info.metrics.yarn.gc.displayNames.gcTimeMillis':'Time',
- 'services.service.info.metrics.yarn.allocated.memory': 'Cluster Memory',
- 'services.service.info.metrics.yarn.allocated.memory.displayNames.allocated': 'Allocated',
- 'services.service.info.metrics.yarn.allocated.memory.displayNames.available': 'Available',
- 'services.service.info.metrics.yarn.allocated.memory.displayNames.pending': 'Pending',
- 'services.service.info.metrics.yarn.allocated.container': 'Containers',
- 'services.service.info.metrics.yarn.allocated.container.displayNames.allocated': 'Allocated',
- 'services.service.info.metrics.yarn.allocated.container.displayNames.reserved': 'Reserved',
- 'services.service.info.metrics.yarn.allocated.container.displayNames.pending': 'Pending',
- 'services.service.info.metrics.yarn.nodemanager.statuses':'NodeManagers',
- 'services.service.info.metrics.yarn.nodemanager.statuses.displayNames.active':'Active Nodemanagers',
- 'services.service.info.metrics.yarn.nodemanager.statuses.displayNames.decommissioned':'Decommissioned Nodemanagers',
- 'services.service.info.metrics.yarn.nodemanager.statuses.displayNames.lost':'Lost Nodemanagers',
- 'services.service.info.metrics.yarn.nodemanager.statuses.displayNames.rebooted':'Rebooted Nodemanagers',
- 'services.service.info.metrics.yarn.nodemanager.statuses.displayNames.unhealthy':'Unhealthy Nodemanagers',
- 'services.service.info.metrics.yarn.queueMemoryResource':'Queue Memory',
- 'services.service.info.metrics.yarn.queueMemoryResource.displayNames.allocated':'Allocated ({0})',
- 'services.service.info.metrics.yarn.queueMemoryResource.displayNames.available':'Available ({0})',
- 'services.service.info.metrics.yarn.queueMemoryResource.displayName':'Queue Memory ({0})',
-
+
'services.service.info.menu.summary':'Summary',
'services.service.info.menu.configs':'Configs',
'services.service.info.summary.hostsRunningMonitor':'{0}/{1}',
@@ -1183,7 +1174,6 @@ Em.I18n.translations = {
'dashboard.widgets.ResourceManagerHeap': 'ResourceManager Heap',
'dashboard.widgets.ResourceManagerUptime': 'ResourceManager Uptime',
'dashboard.widgets.NodeManagersLive': 'NodeManagers Live',
- 'dashboard.widgets.YARNMemory': 'YARN Memory',
'dashboard.services':'Services',
'dashboard.services.hosts':'Hosts',
@@ -1221,10 +1211,6 @@ Em.I18n.translations = {
'dashboard.services.yarn.containers.msg': '{0} allocated / {1} pending / {2} reserved',
'dashboard.services.yarn.apps': 'Applications',
'dashboard.services.yarn.apps.msg': '{0} submitted / {1} running / {2} pending / {3} completed / {4} killed / {5} failed',
- 'dashboard.services.yarn.memory': 'Cluster Memory',
- 'dashboard.services.yarn.memory.msg': '{0} used / {1} reserved / {2} total',
- 'dashboard.services.yarn.queues': 'Queues',
- 'dashboard.services.yarn.queues.msg': '{0} Queues',
'dashboard.services.mapreduce.summary':'{0} of {1} trackers live, {2} jobs running, {3} jobs waiting',
'dashboard.services.mapreduce.taskTrackers':'TaskTrackers',
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/93887864/ambari-web/app/routes/high_availability_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/high_availability_routes.js b/ambari-web/app/routes/high_availability_routes.js
index 0d53fad..1d19646 100644
--- a/ambari-web/app/routes/high_availability_routes.js
+++ b/ambari-web/app/routes/high_availability_routes.js
@@ -103,7 +103,6 @@ module.exports = Em.Route.extend({
step4: Em.Route.extend({
route: '/step4',
connectOutlets: function (router) {
- $('a.close').hide();
var controller = router.get('highAvailabilityWizardController');
controller.setCurrentStep('4');
controller.setLowerStepsDisable(4);
@@ -112,8 +111,25 @@ module.exports = Em.Route.extend({
controller.connectOutlet('highAvailabilityWizardStep4', controller.get('content'));
})
},
+ next: function (router) {
+ router.transitionTo('step5');
+ }
+ }),
+
+ step5: Em.Route.extend({
+ route: '/step5',
+ connectOutlets: function (router) {
+ $('a.close').hide();
+ var controller = router.get('highAvailabilityWizardController');
+ controller.setCurrentStep('5');
+ controller.setLowerStepsDisable(5);
+ controller.dataLoading().done(function () {
+ controller.loadAllPriorSteps();
+ controller.connectOutlet('highAvailabilityWizardStep5', controller.get('content'));
+ })
+ },
back: function (router) {
- router.transitionTo('step3');
+ router.transitionTo('step4');
},
next: function (router) {}
}),
@@ -124,5 +140,7 @@ module.exports = Em.Route.extend({
gotoStep3: Em.Router.transitionTo('step3'),
- gotoStep4: Em.Router.transitionTo('step4')
+ gotoStep4: Em.Router.transitionTo('step4'),
+
+ gotoStep5: Em.Router.transitionTo('step5')
});
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/93887864/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index d8438cd..59775f8 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -280,6 +280,10 @@ h1 {
.btn.btn-success {
/* float: right; */
}
+ .btn-extra-info{
+ padding-top: 6px;
+ padding-right: 15px;
+ }
.btn-area {
margin-top: 20px;
}
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/93887864/ambari-web/app/templates/main/admin/highAvailability/step4.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/highAvailability/step4.hbs b/ambari-web/app/templates/main/admin/highAvailability/step4.hbs
index 5fefd4f..a555437 100644
--- a/ambari-web/app/templates/main/admin/highAvailability/step4.hbs
+++ b/ambari-web/app/templates/main/admin/highAvailability/step4.hbs
@@ -15,27 +15,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
}}
-<div id="ha-step4">
+<div>
<h2>{{t admin.highAvailability.wizard.step4.header}}</h2>
-
- <div class="alert alert-info">{{t admin.highAvailability.wizard.step4.notice}}</div>
- {{#each task in controller.tasks}}
- {{#view view.taskView contentBinding="task"}}
- <div class="item">
- <i {{bindAttr class="view.icon view.iconColor"}}></i>
- <a href="javascript:void(0)">{{task.title}}</a>
- </div>
- <div {{bindAttr class="view.showProgressBar::hide :row :span12" }}>
- <div class="progress-bar span4">
- <div class="progress-striped active progress-info progress">
- <div class="bar" {{bindAttr style="view.barWidth"}}></div>
- </div>
- </div>
- <div class="span1">{{task.progress}}%</div>
- </div>
- {{/view}}
- {{/each}}
+ <p class="alert alert-info">
+ {{{view.step4BodyText}}}
+ </p>
<div class="btn-area">
- <a {{bindAttr class=":btn controller.isSubmitDisabled:disabled :btn-success :pull-right"}} {{action done target="controller"}}>{{t common.done}}</a>
+ <a class="btn btn-success pull-right" {{action next}}>{{t common.next}} →</a>
+ <span class="pull-right btn-extra-info">{{t admin.highAvailability.wizard.step4.ckNotCreated}}</span>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/93887864/ambari-web/app/templates/main/admin/highAvailability/step5.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/highAvailability/step5.hbs b/ambari-web/app/templates/main/admin/highAvailability/step5.hbs
new file mode 100644
index 0000000..5d7028d
--- /dev/null
+++ b/ambari-web/app/templates/main/admin/highAvailability/step5.hbs
@@ -0,0 +1,41 @@
+{{!
+* 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 id="ha-step4">
+ <h2>{{t admin.highAvailability.wizard.step5.header}}</h2>
+
+ <div class="alert alert-info">{{t admin.highAvailability.wizard.step5.notice}}</div>
+ {{#each task in controller.tasks}}
+ {{#view view.taskView contentBinding="task"}}
+ <div class="item">
+ <i {{bindAttr class="view.icon view.iconColor"}}></i>
+ <a href="javascript:void(0)">{{task.title}}</a>
+ </div>
+ <div {{bindAttr class="view.showProgressBar::hide :row :span12" }}>
+ <div class="progress-bar span4">
+ <div class="progress-striped active progress-info progress">
+ <div class="bar" {{bindAttr style="view.barWidth"}}></div>
+ </div>
+ </div>
+ <div class="span1">{{task.progress}}%</div>
+ </div>
+ {{/view}}
+ {{/each}}
+ <div class="btn-area">
+ <a {{bindAttr class=":btn controller.isSubmitDisabled:disabled :btn-success :pull-right"}} {{action done target="controller"}}>{{t common.done}}</a>
+ </div>
+</div>
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/93887864/ambari-web/app/templates/main/admin/highAvailability/wizard.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/highAvailability/wizard.hbs b/ambari-web/app/templates/main/admin/highAvailability/wizard.hbs
index e5ad773..b393620 100644
--- a/ambari-web/app/templates/main/admin/highAvailability/wizard.hbs
+++ b/ambari-web/app/templates/main/admin/highAvailability/wizard.hbs
@@ -29,6 +29,7 @@
<li {{bindAttr class="isStep2:active view.isStep2Disabled:disabled"}}><a href="javascript:void(null);" {{action gotoStep2 target="controller"}}>{{t admin.highAvailability.wizard.step2.header}}</a></li>
<li {{bindAttr class="isStep3:active view.isStep3Disabled:disabled"}}><a href="javascript:void(null);" {{action gotoStep3 target="controller"}}>{{t admin.highAvailability.wizard.step3.header}}</a></li>
<li {{bindAttr class="isStep4:active view.isStep4Disabled:disabled"}}><a href="javascript:void(null);" {{action gotoStep4 target="controller"}}>{{t admin.highAvailability.wizard.step4.header}}</a></li>
+ <li {{bindAttr class="isStep5:active view.isStep4Disabled:disabled"}}><a href="javascript:void(null);" {{action gotoStep5 target="controller"}}>{{t admin.highAvailability.wizard.step5.header}}</a></li>
</ul>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/93887864/ambari-web/app/views.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js
index 0595562..c6eeb5d 100644
--- a/ambari-web/app/views.js
+++ b/ambari-web/app/views.js
@@ -59,6 +59,7 @@ require('views/main/admin/highAvailability/step1_view');
require('views/main/admin/highAvailability/step2_view');
require('views/main/admin/highAvailability/step3_view');
require('views/main/admin/highAvailability/step4_view');
+require('views/main/admin/highAvailability/step5_view');
require('views/main/admin/cluster');
require('views/main/admin/misc_view');
require('views/main/admin/stack_upgrade');
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/93887864/ambari-web/app/views/main/admin/highAvailability/step4_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/highAvailability/step4_view.js b/ambari-web/app/views/main/admin/highAvailability/step4_view.js
index b3ed648..1f38920 100644
--- a/ambari-web/app/views/main/admin/highAvailability/step4_view.js
+++ b/ambari-web/app/views/main/admin/highAvailability/step4_view.js
@@ -23,40 +23,10 @@ App.HighAvailabilityWizardStep4View = Em.View.extend({
templateName: require('templates/main/admin/highAvailability/step4'),
- didInsertElement: function () {
- this.get('controller').loadStep();
- },
+ step4BodyText: function () {
+ this.get('controller').loadUsers();
+ var nN = this.get('controller.content.masterComponentHosts').findProperty('isCurNameNode', true);
+ return Em.I18n.t('admin.highAvailability.wizard.step4.body').format("hdfs", nN.hostName);
+ }.property('controller.content.masterComponentHosts')
- taskView: Em.View.extend({
- icon: '',
- iconColor: '',
-
- didInsertElement: function () {
- this.onStatus();
- },
-
- barWidth: function () {
- return 'width: ' + this.get('content.progress') + '%;';
- }.property('content.progress'),
-
- onStatus: function () {
- if (this.get('content.status') === 'IN_PROGRESS') {
- this.set('icon', 'icon-cog');
- this.set('iconColor', 'text-info');
- } else if (this.get('content.status') === 'FAILED') {
- this.set('icon', 'icon-exclamation-sign');
- this.set('iconColor', 'text-error');
- } else if (this.get('content.status') === 'COMPLETED') {
- this.set('icon', 'icon-ok');
- this.set('iconColor', 'text-success');
- } else {
- this.set('icon', 'icon-cog');
- this.set('iconColor', '');
- }
- }.observes('content.status'),
-
- showProgressBar: function () {
- return this.get('content.status') === "IN_PROGRESS";
- }.property('content.status')
- })
});
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/93887864/ambari-web/app/views/main/admin/highAvailability/step5_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/highAvailability/step5_view.js b/ambari-web/app/views/main/admin/highAvailability/step5_view.js
new file mode 100644
index 0000000..ba5efc5
--- /dev/null
+++ b/ambari-web/app/views/main/admin/highAvailability/step5_view.js
@@ -0,0 +1,62 @@
+/**
+ * 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.HighAvailabilityWizardStep5View = Em.View.extend({
+
+ templateName: require('templates/main/admin/highAvailability/step5'),
+
+ didInsertElement: function () {
+ this.get('controller').loadStep();
+ },
+
+ taskView: Em.View.extend({
+ icon: '',
+ iconColor: '',
+
+ didInsertElement: function () {
+ this.onStatus();
+ },
+
+ barWidth: function () {
+ return 'width: ' + this.get('content.progress') + '%;';
+ }.property('content.progress'),
+
+ onStatus: function () {
+ if (this.get('content.status') === 'IN_PROGRESS') {
+ this.set('icon', 'icon-cog');
+ this.set('iconColor', 'text-info');
+ } else if (this.get('content.status') === 'FAILED') {
+ this.set('icon', 'icon-exclamation-sign');
+ this.set('iconColor', 'text-error');
+ } else if (this.get('content.status') === 'COMPLETED') {
+ this.set('icon', 'icon-ok');
+ this.set('iconColor', 'text-success');
+ } else {
+ this.set('icon', 'icon-cog');
+ this.set('iconColor', '');
+ }
+ }.observes('content.status'),
+
+ showProgressBar: function () {
+ return this.get('content.status') === "IN_PROGRESS";
+ }.property('content.status')
+ })
+});
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/93887864/ambari-web/app/views/main/admin/highAvailability/wizard_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/highAvailability/wizard_view.js b/ambari-web/app/views/main/admin/highAvailability/wizard_view.js
index 3b3b739..d1d4e85 100644
--- a/ambari-web/app/views/main/admin/highAvailability/wizard_view.js
+++ b/ambari-web/app/views/main/admin/highAvailability/wizard_view.js
@@ -39,6 +39,10 @@ App.HighAvailabilityWizardView = Em.View.extend({
return this.isStepDisabled(4);
}.property('controller.isStepDisabled.@each.value').cacheable(),
+ isStep5Disabled: function () {
+ return this.isStepDisabled(5);
+ }.property('controller.isStepDisabled.@each.value').cacheable(),
+
isStepDisabled: function (index) {
return this.get('controller.isStepDisabled').findProperty('step', index).get('value');
}