github.com/manicqin/nomad@v0.9.5/ui/app/templates/components/task-file.hbs (about)

     1  {{#if 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 task 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      {{#if (not fileTypeIsUnknown)}}
    12        <a data-test-log-action="raw" class="button is-white is-compact" href="{{catUrl}}" target="_blank" rel="noopener noreferrer">View Raw File</a>
    13      {{/if}}
    14      {{#if (and isLarge isStreamable)}}
    15        <button data-test-log-action="head" class="button is-white is-compact" onclick={{action "gotoHead"}}>Head</button>
    16        <button data-test-log-action="tail" class="button is-white is-compact" onclick={{action "gotoTail"}}>Tail</button>
    17      {{/if}}
    18      {{#if isStreamable}}
    19        <button data-test-log-action="toggle-stream" class="button is-white is-compact" onclick={{action "toggleStream"}}>
    20          {{x-icon (if 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 fileComponent "stream") "is-dark is-full-bleed"}}">
    26    {{#if (eq fileComponent "stream")}}
    27      {{streaming-file logger=logger mode=mode isStreaming=isStreaming}}
    28    {{else if (eq fileComponent "image")}}
    29      {{image-file src=catUrl alt=stat.Name size=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          <a data-test-log-action="raw" class="button is-light" href="{{catUrl}}" target="_blank" rel="noopener noreferrer">View Raw File</a>
    36        </p>
    37      </div>
    38    {{/if}}
    39  </div>