You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2013/10/17 14:08:29 UTC
git commit: AMBARI-3521 Incorrect status counters on cluster deploy.
(ababiichuk)
Updated Branches:
refs/heads/trunk 8d534ee11 -> 0cdf5a8f9
AMBARI-3521 Incorrect status counters on cluster deploy. (ababiichuk)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/0cdf5a8f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/0cdf5a8f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/0cdf5a8f
Branch: refs/heads/trunk
Commit: 0cdf5a8f9b8bdcb6c8ea54692903dc7d3e06dc28
Parents: 8d534ee
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Thu Oct 17 15:05:27 2013 +0300
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Thu Oct 17 15:05:27 2013 +0300
----------------------------------------------------------------------
ambari-web/app/controllers/wizard/step9_controller.js | 13 ++++++++++---
ambari-web/app/messages.js | 1 +
2 files changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/0cdf5a8f/ambari-web/app/controllers/wizard/step9_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step9_controller.js b/ambari-web/app/controllers/wizard/step9_controller.js
index 8496930..2f8c3a3 100644
--- a/ambari-web/app/controllers/wizard/step9_controller.js
+++ b/ambari-web/app/controllers/wizard/step9_controller.js
@@ -492,6 +492,7 @@ App.WizardStep9Controller = Em.Controller.extend({
runningAction = actions.findProperty('Tasks.status', 'PENDING');
}
if (runningAction !== null && runningAction !== undefined) {
+ contentHost.set('status', 'in_progress');
contentHost.set('message', this.displayMessage(runningAction.Tasks));
}
},
@@ -636,7 +637,10 @@ App.WizardStep9Controller = Em.Controller.extend({
if (this.get('status') === 'failed') {
clusterStatus.status = 'INSTALL FAILED';
this.set('progress', '100');
- this.get('hosts').setEach('progress', '100');
+ this.get('hosts').forEach(function(host){
+ host.get('status') != 'failed' ? host.set('message',Em.I18n.t('installer.step9.host.status.startAborted')) : null;
+ host.set('progress','100');
+ });
App.router.get(this.get('content.controllerName')).saveClusterStatus(clusterStatus);
this.set('isStepCompleted', true);
} else {
@@ -702,9 +706,11 @@ App.WizardStep9Controller = Em.Controller.extend({
if (actionsPerHost.length === 0) {
if(this.get('content.cluster.status') === 'PENDING') {
_host.set('progress', '33');
+ _host.set('status', 'pending');
}
- if(this.get('content.cluster.status') === 'INSTALLED') {
+ if(this.get('content.cluster.status') === 'INSTALLED' || this.get('content.cluster.status') === 'FAILED') {
_host.set('progress', '100');
+ _host.set('status', 'success');
}
console.log("INFO: No task is hosted on the host");
}
@@ -713,8 +719,9 @@ App.WizardStep9Controller = Em.Controller.extend({
this.onErrorPerHost(actionsPerHost, _host); // any action should be a failure
this.onInProgressPerHost(actionsPerHost, _host); // current running action for a host
totalProgress += self.progressPerHost(actionsPerHost, _host);
- if (_host.get('progress') == '33') {
+ if (_host.get('progress') == '33' && _host.get('status') != 'failed' && _host.get('status') != 'warning') {
_host.set('message', this.t('installer.step9.host.status.nothingToInstall'));
+ _host.set('status', 'pending');
}
}, this);
totalProgress = Math.floor(totalProgress / this.get('hosts.length'));
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/0cdf5a8f/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 9a84ac0..47078cf 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -470,6 +470,7 @@ Em.I18n.translations = {
'installer.step9.status.warning':'Installed and started the services with some warnings.',
'installer.step9.status.failed':'Failed to install/start the services.',
'installer.step9.host.status.success':'Success',
+ 'installer.step9.host.status.startAborted':'Install completed. Start aborted',
'installer.step9.host.status.warning':'Warnings encountered',
'installer.step9.host.status.failed':'Failures encountered',
'installer.step9.host.status.nothingToInstall':'Waiting (Nothing to install)',