-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from drteeth/show-retry-details
Add visibility into failed jobs
- Loading branch information
Showing
9 changed files
with
102 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import Ember from "ember"; | ||
var ShowController; | ||
|
||
ShowController = Ember.Controller.extend({ | ||
actions: { | ||
removeRetry: function(retry) { | ||
var self; | ||
self = this; | ||
retry.deleteRecord(); | ||
return retry.save().then(function(_f) { | ||
return self.send('reloadStats'); | ||
}); | ||
}, | ||
requeueRetry: function(retry) { | ||
var self; | ||
self = this; | ||
return retry.save().then(function(_f) { | ||
self.send('reloadStats'); | ||
return self.store.unloadRecord(retry); | ||
}); | ||
} | ||
} | ||
}); | ||
|
||
export default ShowController; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
import DS from 'ember-data'; | ||
import Ember from 'ember'; | ||
|
||
var Retry = DS.Model.extend({ | ||
queue: DS.attr('string'), | ||
"class": DS.attr('string'), | ||
args: DS.attr('string'), | ||
args: DS.attr(), | ||
failed_at: DS.attr('date'), | ||
error_message: DS.attr('string'), | ||
retry: DS.attr('boolean'), | ||
retry_count: DS.attr('number') | ||
retry_count: DS.attr('number'), | ||
|
||
prettyArgs: Ember.computed('args', function(){ | ||
return JSON.stringify(this.get('args'), null, 2); | ||
}) | ||
}); | ||
|
||
export default Retry; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
var ShowRoute; | ||
import Ember from "ember"; | ||
|
||
ShowRoute = Ember.Route.extend({ | ||
model: function(params) { | ||
return this.store.findRecord('retry', params.id); | ||
} | ||
}); | ||
|
||
export default ShowRoute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<h1>{{model.class}}</h1> | ||
<dl> | ||
<dt>Queue</dt> | ||
<dd>{{model.queue}}</dd> | ||
</dl> | ||
|
||
<dl> | ||
<dt>Failed at</dt> | ||
<dd>{{model.failed_at}}</dd> | ||
</dl> | ||
|
||
<dl> | ||
<dt>Retry count</dt> | ||
<dd>{{model.retry_count}}</dd> | ||
</dl> | ||
|
||
<dl> | ||
<dt>Error</dt> | ||
<dd><pre>{{model.error_message}}</pre></dd> | ||
</dl> | ||
|
||
<dl> | ||
<dt>Arguments</dt> | ||
<dd><pre>{{model.prettyArgs}}</pre></dd> | ||
</dl> | ||
|
||
<button {{action 'removeRetry' model on="click"}} class="btn btn-danger btn-xs">Delete</button> | ||
<button {{action 'requeueRetry' model on="click"}} class="btn btn-secondary btn-xs">Retry</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters