diff --git a/assets/scripts/app/models/job.coffee b/assets/scripts/app/models/job.coffee index 58c5d271..92a711fb 100644 --- a/assets/scripts/app/models/job.coffee +++ b/assets/scripts/app/models/job.coffee @@ -83,6 +83,14 @@ require 'travis/model' Travis.ajax.post "/jobs/#{@get('id')}/cancel" ) + removeLog: -> + Travis.ajax.patch("/jobs/#{@get('id')}/log").then => + @reloadLog() + + reloadLog: -> + @clearLog() + @get('log').fetch() + requeue: -> Travis.ajax.post "/jobs/#{@get('id')}/restart" @@ -125,6 +133,12 @@ require 'travis/model' moment(finishedAt).format('lll') ).property('finishedAt') + canRemoveLog: (-> + # This should somehow get the status of removed log, but unfortunately there is + # no easy way to do that at the moment + true + ).property() + @Travis.Job.reopenClass queued: -> filtered = Ember.FilteredRecordArray.create( diff --git a/assets/scripts/app/templates/repos/show/actions.hbs b/assets/scripts/app/templates/repos/show/actions.hbs index c6626123..bb398840 100644 --- a/assets/scripts/app/templates/repos/show/actions.hbs +++ b/assets/scripts/app/templates/repos/show/actions.hbs @@ -1,5 +1,11 @@