2020-07-09 20:19:07 +00:00
|
|
|
{{#if this.noConnection}}
|
2019-06-27 16:21:00 +00:00
|
|
|
<div data-test-connection-error class="notification is-error">
|
|
|
|
<h3 class="title is-4">Cannot fetch file</h3>
|
2020-07-09 20:19:07 +00:00
|
|
|
<p>The files for this {{if this.task 'task' 'allocation'}} are inaccessible. Check the condition of the client the allocation is on.</p>
|
2019-06-27 16:21:00 +00:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
2019-07-31 00:21:12 +00:00
|
|
|
<div data-test-header class="boxed-section-head">
|
2019-07-20 19:00:20 +00:00
|
|
|
{{yield}}
|
2019-06-27 16:21:00 +00:00
|
|
|
<span class="pull-right">
|
2019-07-25 17:53:45 +00:00
|
|
|
|
2020-07-09 20:19:07 +00:00
|
|
|
{{#unless this.fileTypeIsUnknown}}
|
2020-10-31 20:11:14 +00:00
|
|
|
<button data-test-log-action="raw" class="button is-white is-compact" onclick={{action "downloadFile"}}>View Raw File</button>
|
2020-07-09 17:30:11 +00:00
|
|
|
{{/unless}}
|
2020-07-09 20:19:07 +00:00
|
|
|
{{#if (and this.isLarge this.isStreamable)}}
|
2020-07-09 17:30:11 +00:00
|
|
|
<button data-test-log-action="head" class="button is-white is-compact" onclick={{action "gotoHead"}} type="button">Head</button>
|
|
|
|
<button data-test-log-action="tail" class="button is-white is-compact" onclick={{action "gotoTail"}} type="button">Tail</button>
|
2019-06-27 16:21:00 +00:00
|
|
|
{{/if}}
|
2020-07-09 20:19:07 +00:00
|
|
|
{{#if this.isStreamable}}
|
2020-08-25 15:56:02 +00:00
|
|
|
<button data-test-log-action="toggle-stream" class="button is-white is-compact" onclick={{action "toggleStream"}} type="button" title="{{if this.logger.isStreaming "Pause" "Start"}} streaming">
|
2020-07-09 20:19:07 +00:00
|
|
|
{{x-icon (if this.logger.isStreaming "media-pause" "media-play") class="is-text"}}
|
2019-06-27 16:21:00 +00:00
|
|
|
</button>
|
|
|
|
{{/if}}
|
|
|
|
</span>
|
|
|
|
</div>
|
2020-07-09 20:19:07 +00:00
|
|
|
<div data-test-file-box class="boxed-section-body {{if (eq this.fileComponent "stream") "is-dark is-full-bleed"}}">
|
|
|
|
{{#if (eq this.fileComponent "stream")}}
|
|
|
|
<StreamingFile @logger={{this.logger}} @mode={{this.mode}} @isStreaming={{this.isStreaming}} />
|
|
|
|
{{else if (eq this.fileComponent "image")}}
|
|
|
|
<ImageFile @src={{this.catUrl}} @alt={{this.stat.Name}} @size={{this.stat.Size}} />
|
2019-07-02 20:01:07 +00:00
|
|
|
{{else}}
|
2019-07-31 00:21:12 +00:00
|
|
|
<div data-test-unsupported-type class="empty-message is-hollow">
|
2019-07-25 17:53:45 +00:00
|
|
|
<h3 class="empty-message-headline">Unsupported File Type</h3>
|
2019-08-07 22:11:32 +00:00
|
|
|
<p class="empty-message-body message">The Nomad UI could not render this file, but you can still view the file directly.</p>
|
2019-07-25 17:53:45 +00:00
|
|
|
<p class="empty-message-body">
|
2020-10-31 20:11:14 +00:00
|
|
|
<button data-test-log-action="raw" class="button is-light" onclick={{action "downloadFile"}}>View Raw File</button>
|
2019-07-25 17:53:45 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
2019-07-02 20:01:07 +00:00
|
|
|
{{/if}}
|
2019-06-27 16:21:00 +00:00
|
|
|
</div>
|