Don't show toTop or tailing buttons if there's no log
This commit is contained in:
parent
a6268f3e47
commit
efde5d7b6f
|
@ -12,6 +12,7 @@
|
||||||
<a class="button button--grey" {{bind-attr href="view.plainTextLogUrl"}}><span class="icon icon--downloadLog"></span> Download Log</a>
|
<a class="button button--grey" {{bind-attr href="view.plainTextLogUrl"}}><span class="icon icon--downloadLog"></span> Download Log</a>
|
||||||
</menu>
|
</menu>
|
||||||
<div class="log-body">
|
<div class="log-body">
|
||||||
|
{{#if view.showTailing}}
|
||||||
<a href="#" id="tail" class="log-tail" {{action "toggleTailing" target=view}}>
|
<a href="#" id="tail" class="log-tail" {{action "toggleTailing" target=view}}>
|
||||||
<span class="tail-status"></span>
|
<span class="tail-status"></span>
|
||||||
<span class="tail-label button button--grey"><span class="icon icon--down"></span>
|
<span class="tail-label button button--grey"><span class="icon icon--down"></span>
|
||||||
|
@ -22,9 +23,11 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<pre id="log" class="ansi"></pre>
|
<pre id="log" class="ansi"></pre>
|
||||||
|
|
||||||
{{#if view.log.hasContent}}
|
{{#if view.showToTop}}
|
||||||
<a href='#' class="to-top" {{action "toTop" target=view}}>Top</a>
|
<a href='#' class="to-top" {{action "toTop" target=view}}>Top</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
@ -111,6 +111,11 @@ View = BasicView.extend
|
||||||
job.get('canRemoveLog') && @get('hasPermission')
|
job.get('canRemoveLog') && @get('hasPermission')
|
||||||
).property('job.canRemoveLog', 'hasPermission')
|
).property('job.canRemoveLog', 'hasPermission')
|
||||||
|
|
||||||
|
showToTop: (->
|
||||||
|
@get('log.hasContent') && @get('job.canRemoveLog')
|
||||||
|
).property('log.hasContent', 'job.canRemoveLog')
|
||||||
|
showTailing: Ember.computed.alias('showToTop')
|
||||||
|
|
||||||
actions:
|
actions:
|
||||||
toTop: () ->
|
toTop: () ->
|
||||||
Travis.tailing.stop()
|
Travis.tailing.stop()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user