github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/ui/app/templates/components/fs/file.hbs (about)

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