Permalink
Browse files

Merge pull request #894 from rsvato/master

[RJA-1911] [ feature] - Expand failed steps
  • Loading branch information...
2 parents 1f08d47 + 07f9d8d commit d2592fd329bbf15355f291951bf9558267bc6862 ddurnev committed Mar 21, 2013
@@ -11,6 +11,16 @@ template {
}
}
+ workflow("update") {
+ steps {
+ execLocal {
+ phase = "init"
+ shell = "sh"
+ commands = ['echo "Creation of new environment..."']
+ }
+ }
+ }
+
workflow("destroy") {
steps {
}
@@ -225,11 +225,14 @@ function (genesis, Backbone, status, $) {
render: function(callback) {
var self = this;
$.when(genesis.fetchTemplate(this.template)).done(function (tmpl) {
+ var failedSteps = _.filter(self.model.get('steps'), function(step) {
+ return step.status == 'Failed';
+ });
+
var htmls = _.chain(self.actionViews).keys().reduce(function(memo, item) { //real hardcore!
memo[item] = self.actionViews[item].html();
return memo;
}, {}).value();
-
self.$el.html(tmpl({
workflow: self.model.toJSON(),
projectId: self.model.projectId || self.model.collection.projectId,
@@ -239,6 +242,10 @@ function (genesis, Backbone, status, $) {
utils: genesis.utils
}));
+ _.each(failedSteps, function(step){
+ self.showStepActions(step.stepId);
+ });
+
_.chain(self.actionViews).keys().each(function(stepId) {
self.actionViews[stepId].setElement(self.$("#step-"+ stepId + "-actions .subtable"));
self.actionViews[stepId].refresh();

0 comments on commit d2592fd

Please sign in to comment.