Fix: managing deployment failure

This commit is contained in:
2015-11-25 16:01:41 +00:00
parent e135c5d2c6
commit 75c0ec650c
7 changed files with 86 additions and 18 deletions

View File

@@ -10,7 +10,20 @@ Template.deploymentDetails.helpers({
},
running: function() {
var string = this.status;
if( !string ) {
return '';
}
return string.charAt(0).toUpperCase() + string.slice(1);
},
deployment_status: function() {
switch( this.status ) {
case 'closed' :
return this.output[this.output.length - 1].error ? 'bg-danger' : 'bg-success';
case 'pending' :
return 'bg-info';
default :
return 'bg-default';
}
}
});