github.com/hernad/nomad@v1.6.112/ui/app/templates/components/fs/file.hbs (about) 1 {{! 2 Copyright (c) HashiCorp, Inc. 3 SPDX-License-Identifier: MPL-2.0 4 ~}} 5 6 {{#if this.noConnection}} 7 <div data-test-connection-error class="notification is-error"> 8 <h3 class="title is-4">Cannot fetch file</h3> 9 <p>The files for this {{if this.task 'task' 'allocation'}} are inaccessible. Check the condition of the client the allocation is on.</p> 10 </div> 11 {{/if}} 12 <div data-test-header class="boxed-section-head"> 13 {{yield}} 14 <span class="pull-right"> 15 16 {{#unless this.fileTypeIsUnknown}} 17 <button data-test-log-action="raw" class="button is-white is-compact" onclick={{action "downloadFile"}} type="button">View Raw File</button> 18 {{/unless}} 19 {{#if (and this.isLarge this.isStreamable)}} 20 <button data-test-log-action="head" class="button is-white is-compact" onclick={{action "gotoHead"}} type="button">Head</button> 21 <button data-test-log-action="tail" class="button is-white is-compact" onclick={{action "gotoTail"}} type="button">Tail</button> 22 {{/if}} 23 {{#if this.isStreamable}} 24 <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"> 25 {{x-icon (if this.logger.isStreaming "media-pause" "media-play") class="is-text"}} 26 </button> 27 {{/if}} 28 </span> 29 </div> 30 <div data-test-file-box class="boxed-section-body {{if (eq this.fileComponent "stream") "is-dark is-full-bleed"}}"> 31 {{#if (eq this.fileComponent "stream")}} 32 <StreamingFile @logger={{this.logger}} @mode={{this.mode}} @isStreaming={{this.isStreaming}} /> 33 {{else if (eq this.fileComponent "image")}} 34 <ImageFile @src={{this.catUrl}} @alt={{this.stat.Name}} @size={{this.stat.Size}} /> 35 {{else}} 36 <div data-test-unsupported-type class="empty-message is-hollow"> 37 <h3 class="empty-message-headline">Unsupported File Type</h3> 38 <p class="empty-message-body message">The Nomad UI could not render this file, but you can still view the file directly.</p> 39 <p class="empty-message-body"> 40 <button data-test-log-action="raw" class="button is-light" onclick={{action "downloadFile"}} type="button">View Raw File</button> 41 </p> 42 </div> 43 {{/if}} 44 </div>