Don't show toTop or tailing buttons if there's no log
This commit is contained in:
parent
a6268f3e47
commit
efde5d7b6f
|
@ -12,19 +12,22 @@
|
||||||
<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">
|
||||||
<a href="#" id="tail" class="log-tail" {{action "toggleTailing" target=view}}>
|
{{#if view.showTailing}}
|
||||||
<span class="tail-status"></span>
|
<a href="#" id="tail" class="log-tail" {{action "toggleTailing" target=view}}>
|
||||||
<span class="tail-label button button--grey"><span class="icon icon--down"></span>
|
<span class="tail-status"></span>
|
||||||
{{#if view.job.isFinished}}
|
<span class="tail-label button button--grey"><span class="icon icon--down"></span>
|
||||||
Scroll to End of Log
|
{{#if view.job.isFinished}}
|
||||||
{{else}}
|
Scroll to End of Log
|
||||||
Follow Log
|
{{else}}
|
||||||
{{/if}}
|
Follow Log
|
||||||
</span>
|
{{/if}}
|
||||||
</a>
|
</span>
|
||||||
|
</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