Don't display remove log button if it's already removed

This commit is contained in:
Piotr Sarnacki 2015-01-09 15:02:34 +01:00
parent aca82a0379
commit 09075e880d
2 changed files with 6 additions and 5 deletions

View File

@ -132,10 +132,8 @@ require 'travis/model'
).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()
!@get('log.removed')
).property('log.removed')
slug: (->
"#{@get('repo.slug')} ##{@get('number')}"

View File

@ -39,7 +39,10 @@ require 'travis/log_chunks'
console.log 'log model: fetching log' if Log.DEBUG
@clearParts()
handlers =
json: (json) => @loadParts(json['log']['parts'])
json: (json) =>
if json['log']['removed_at']
@set('removed', true)
@loadParts(json['log']['parts'])
text: (text) => @loadText(text)
Travis.Log.Request.create(id: id, handlers: handlers).run() if id = @get('job.id')