Skip to content
Browse files

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

  • Loading branch information...
1 parent 5c83d28 commit dc33ee3ae88d04d2a97208229f866557efd1144b @rsvato committed Mar 21, 2013
View
22 test-automation/cucumber/templates/Simple.genesis
@@ -11,6 +11,28 @@ template {
}
}
+ workflow("update") {
+ steps {
+ execLocal {
+ phase = "init"
+ shell = "sh"
+ commands = ['echo "Creation of new environment..."']
+ }
+ execLocal {
+ phase = "postinit"
+ precedingPhases = ["init"]
+ shell = "sh"
+ commands = ['echo "Post init..." && /bin/nocommand']
+ }
+ execLocal {
+ phase = "finish"
+ precedingPhases = ["init", "postinit"]
+ shell = "sh"
+ commands = ['echo "Post init..." && /bin/nocommand']
+ }
+ }
+ }
+
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 dc33ee3

Please sign in to comment.
Something went wrong with that request. Please try again.