github.com/hernad/nomad@v1.6.112/ui/app/components/task-context-sidebar.hbs (about) 1 {{! 2 Copyright (c) HashiCorp, Inc. 3 SPDX-License-Identifier: MPL-2.0 4 ~}} 5 6 <Portal @target="log-sidebar-portal"> 7 <div 8 class="sidebar task-context-sidebar has-subnav {{if this.wide "wide"}} {{if @task.events.length "has-events"}} {{if this.isSideBarOpen "open"}}" 9 {{on-click-outside 10 @fns.closeSidebar 11 capture=true 12 }} 13 > 14 {{#if @task}} 15 {{keyboard-commands this.keyCommands}} 16 <header> 17 <h1 class="title"> 18 {{@task.name}} 19 <span class="state {{@task.state}}"> 20 {{@task.state}} 21 </span> 22 </h1> 23 <LinkTo 24 class="link" 25 title={{@task.name}} 26 @route="allocations.allocation.task" 27 @models={{array @task.allocation @task}} 28 > 29 Go to Task page 30 </LinkTo> 31 <button 32 class="button close is-borderless" 33 type="button" 34 {{on "click" @fns.closeSidebar}} 35 > 36 {{x-icon "cancel"}} 37 </button> 38 </header> 39 {{#if @task.events.length}} 40 <div class="boxed-section task-events"> 41 <div class="boxed-section-head"> 42 Recent Events 43 </div> 44 <div class="boxed-section-body is-full-bleed"> 45 <ListTable 46 @source={{reverse @task.events}} 47 @class="is-striped" as |t| 48 > 49 <t.head> 50 <th class="is-3"> 51 Time 52 </th> 53 <th class="is-1"> 54 Type 55 </th> 56 <th> 57 Description 58 </th> 59 </t.head> 60 <t.body as |row|> 61 <tr data-test-task-event> 62 <td data-test-task-event-time> 63 {{format-ts row.model.time}} 64 </td> 65 <td data-test-task-event-type> 66 {{row.model.type}} 67 </td> 68 <td data-test-task-event-message> 69 {{#if row.model.message}} 70 {{row.model.message}} 71 {{else}} 72 <em> 73 No message 74 </em> 75 {{/if}} 76 </td> 77 </tr> 78 </t.body> 79 </ListTable> 80 </div> 81 </div> 82 {{/if}} 83 84 <TaskLog 85 @allocation={{@task.allocation}} 86 @task={{@task.name}} 87 @shouldFillHeight={{false}} 88 /> 89 90 91 {{/if}} 92 <button 93 class="button is-borderless widener" 94 type="button" 95 {{on "click" this.toggleWide}} 96 > 97 {{#if this.wide}} 98 {{keyboard-commands (array this.narrowCommand)}} 99 {{else}} 100 {{keyboard-commands (array this.widenCommand)}} 101 {{/if}} 102 {{x-icon (if this.wide "arrow-right" "arrow-left")}} 103 </button> 104 </div> 105 </Portal>