Permalink
Browse files

[RJA-1911] [ feature] - Expand failed steps

[RJA-1911] [ feature] - Expand failed steps
  • Loading branch information...
1 parent 5c83d28 commit efe82369edb577b9fe5f156e32b1fadca7847d78 @rsvato committed Mar 21, 2013
View
10 test-automation/cucumber/templates/Simple.genesis
@@ -11,6 +11,16 @@ template {
}
}
+ workflow("update") {
+ steps {
+ execLocal {
+ phase = "init"
+ shell = "sh"
+ commands = ['echo "Creation of new environment..."']
+ }
+ }
+ }
+
workflow("destroy") {
steps {
}
View
11 ui/src/main/resources/genesis/app/modules/env_details/history.js
@@ -225,11 +225,16 @@ 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';
+ });
+ _.each(failedSteps, function(step){
+ self.showStepActions(step.stepId);
+ });
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 +244,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 efe8236

Please sign in to comment.