You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vg...@apache.org on 2012/05/27 04:19:31 UTC
svn commit: r1342993 - in /incubator/ambari/branches/ambari-186: CHANGES.txt
hmc/js/txnUtils.js
Author: vgogate
Date: Sun May 27 02:19:31 2012
New Revision: 1342993
URL: http://svn.apache.org/viewvc?rev=1342993&view=rev
Log:
Fix TxnProgressWidget To Show Failed States When No SubTxn Is In Progress by reznor
Modified:
incubator/ambari/branches/ambari-186/CHANGES.txt
incubator/ambari/branches/ambari-186/hmc/js/txnUtils.js
Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1342993&r1=1342992&r2=1342993&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Sun May 27 02:19:31 2012
@@ -6,6 +6,8 @@ characters wide.
Release 0.1.x - unreleased
+ AMBARI-273. Fix TxnProgressWidget To Show Failed States When No SubTxn Is In Progress (reznor via vgogate)
+
AMBARI-294. Add Nodes page - incorrect field label (Yusaku Sako via vgogate)
AMBARI-293. Invoking browser "back" action on any step after the Add
Modified: incubator/ambari/branches/ambari-186/hmc/js/txnUtils.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/js/txnUtils.js?rev=1342993&r1=1342992&r2=1342993&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/js/txnUtils.js (original)
+++ incubator/ambari/branches/ambari-186/hmc/js/txnUtils.js Sun May 27 02:19:31 2012
@@ -8,9 +8,9 @@ function TxnProgressWidget( txnProgressC
/* Step over any deploy progress states that aren't in the CLUSTER, SERVICE
* or SERVICE-SMOKETEST contexts.
*/
- if( txnProgressState.subTxnType != 'CLUSTER' &&
- txnProgressState.subTxnType != 'SERVICE' &&
- txnProgressState.subTxnType != 'SERVICE-SMOKETEST' ) {
+ if( (txnProgressState.subTxnType != 'CLUSTER') &&
+ (txnProgressState.subTxnType != 'SERVICE') &&
+ (txnProgressState.subTxnType != 'SERVICE-SMOKETEST') ) {
skipIt = true;
}
@@ -111,10 +111,20 @@ function TxnProgressWidget( txnProgressC
continue;
}
- /* We only care to process "in-progress" states. */
- if( presentTxnProgressState.progress == 'IN_PROGRESS' ) {
+ /* We only care to process "in-progress" states.
+ *
+ * However, when a state fails, its progress property is set to
+ * 'FAILED', so check for that as well. Without this, a failed
+ * state leads to only the previous 'COMPLETED' states being
+ * rendered (with the 'FAILED' and 'PENDING' states being skipped
+ * over because there's no 'IN_PROGRESS' state) whilst
+ * #txnProgressStatusDivId shows an overall error (as it rightly
+ * should) - in short, confusion all around.
+ */
+ if( (presentTxnProgressState.progress == 'IN_PROGRESS') ||
+ (presentTxnProgressState.progress == 'FAILED') ) {
- globalYui.log( 'In progress - ' + progressStateIndex );
+ globalYui.log( 'In-progress/failed - ' + progressStateIndex );
/* Decide upon what CSS class to assign to the currently-in-progress
* state - if an error was marked as having been encountered, assign
@@ -123,7 +133,14 @@ function TxnProgressWidget( txnProgressC
*/
var currentProgressStateCssClass = 'txnProgressStateInProgress';
- if( txnProgress.encounteredError ) {
+ /* The 2 possible indications of error are:
+ *
+ * a) presentTxnProgressState.progress is 'IN_PROGRESS' but
+ * txnProgress.encounteredError is true.
+ * b) presentTxnProgressState.progress is 'FAILED'.
+ */
+ if( (txnProgress.encounteredError) ||
+ (presentTxnProgressState.progress == 'FAILED') ) {
currentProgressStateCssClass = 'txnProgressStateError';
}