github.com/hernad/nomad@v1.6.112/ui/app/templates/evaluations/index.hbs (about) 1 {{! 2 Copyright (c) HashiCorp, Inc. 3 SPDX-License-Identifier: MPL-2.0 4 ~}} 5 6 {{page-title "Evaluations"}} 7 {{did-update this.notifyEvalChange this.currentEval}} 8 <section class="section"> 9 <div class="toolbar"> 10 <div class="toolbar-item"> 11 <SearchBox 12 data-test-evaluations-search 13 @searchTerm={{mut this.searchTerm}} 14 @onChange={{action this._resetTokens}} 15 @placeholder="Search evaluations..." 16 /> 17 </div> 18 <div class="toolbar-item is-right-aligned"> 19 <div class="button-bar"> 20 <SingleSelectDropdown 21 data-test-evaluation-namespace-facet 22 @label="Namespace" 23 @options={{this.optionsNamespaces}} 24 @selection={{this.qpNamespace}} 25 @onSelect={{action this.setQueryParam "qpNamespace"}} 26 /> 27 <SingleSelectDropdown 28 data-test-evaluation-status-facet 29 @label="Status" 30 @options={{this.optionsEvaluationsStatus}} 31 @selection={{this.status}} 32 @onSelect={{action this.setQueryParam "status"}} 33 /> 34 <SingleSelectDropdown 35 data-test-evaluation-triggered-by-facet 36 @label="Triggered By" 37 @options={{this.optionsTriggeredBy}} 38 @selection={{this.triggeredBy}} 39 @onSelect={{action this.setQueryParam "triggeredBy"}} 40 /> 41 <SingleSelectDropdown 42 data-test-evaluation-type-facet 43 @label="Type" 44 @options={{this.optionsType}} 45 @selection={{this.type}} 46 @onSelect={{action this.setQueryParam "type"}} 47 /> 48 </div> 49 </div> 50 </div> 51 <div class="table-container"> 52 {{#if @model.length}} 53 <ListTable data-test-eval-table @source={{@model}} as |t|> 54 <t.head> 55 <th> 56 Evaluation ID 57 </th> 58 <th> 59 Resource 60 </th> 61 <th> 62 Priority 63 </th> 64 <th> 65 Created 66 </th> 67 <th> 68 Triggered By 69 </th> 70 <th> 71 Status 72 </th> 73 <th> 74 Placement Failures 75 </th> 76 </t.head> 77 <t.body as |row|> 78 <tr 79 data-test-evaluation="{{row.model.shortId}}" 80 style="cursor: pointer;" 81 class="{{if (eq this.currentEval row.model.id) "is-active"}}" 82 tabindex="0" 83 {{on "click" (fn this.handleEvaluationClick row.model)}} 84 {{on "keyup" (fn this.handleEvaluationClick row.model)}} 85 > 86 <td data-test-id 87 {{keyboard-shortcut 88 enumerated=true 89 action=(fn this.handleEvaluationClick row.model) 90 }} 91 > 92 {{row.model.shortId}} 93 </td> 94 <td data-test-id> 95 {{#if row.model.hasJob}} 96 <LinkTo 97 data-test-evaluation-resource 98 @model={{concat row.model.plainJobId "@" row.model.namespace}} 99 @route="jobs.job" 100 > 101 {{row.model.plainJobId}} 102 </LinkTo> 103 {{else}} 104 <LinkTo 105 data-test-evaluation-resource 106 @model={{row.model.nodeId}} 107 @route="clients.client" 108 > 109 {{row.model.shortNodeId}} 110 </LinkTo> 111 {{/if}} 112 </td> 113 <td data-test-priority> 114 {{row.model.priority}} 115 </td> 116 <td data-test-create-time> 117 {{format-month-ts row.model.createTime}} 118 </td> 119 <td data-test-triggered-by> 120 {{row.model.triggeredBy}} 121 </td> 122 <td data-test-status class="is-one-line"> 123 <StatusCell @status={{row.model.status}} /> 124 </td> 125 <td data-test-blocked> 126 {{#if (eq row.model.status "blocked")}} 127 N/A - In Progress 128 {{else if row.model.hasPlacementFailures}} 129 True 130 {{else}} 131 False 132 {{/if}} 133 </td> 134 </tr> 135 </t.body> 136 </ListTable> 137 <div class="table-foot with-padding"> 138 <PageSizeSelect data-test-per-page @onChange={{this.onChange}} /> 139 <div> 140 <button 141 class="button" 142 data-test-eval-refresh 143 type="button" 144 {{on "click" this.refresh}} 145 > 146 {{x-icon "refresh-default" class="is-text"}} 147 Refresh 148 </button> 149 <button 150 data-test-eval-pagination-prev 151 type="button" 152 class="button is-text is-borderless" 153 disabled={{this.shouldDisablePrev}} 154 {{on "click" (fn this.onPrev this.lastToken)}} 155 > 156 {{x-icon "chevron-left" class="is-large"}} 157 </button> 158 <button 159 data-test-eval-pagination-next 160 type="button" 161 class="button is-text is-borderless" 162 disabled={{this.shouldDisableNext}} 163 {{on "click" (fn this.onNext @model.meta.nextToken)}} 164 > 165 {{x-icon "chevron-right" class="is-large"}} 166 </button> 167 </div> 168 </div> 169 {{else}} 170 <div class="boxed-section-body"> 171 <div class="empty-message" data-test-empty-evaluations-list> 172 <h3 173 class="empty-message-headline" 174 data-test-empty-evalations-list-headline 175 > 176 No Matches 177 </h3> 178 <p class="empty-message-body"> 179 {{#if this.hasFiltersApplied}} 180 <span data-test-no-eval-match> 181 No evaluations that match: 182 <strong> 183 {{this.noMatchText}} 184 </strong> 185 </span> 186 {{else}} 187 <span data-test-no-eval> 188 There are no evaluations 189 </span> 190 {{/if}} 191 </p> 192 </div> 193 </div> 194 {{/if}} 195 </div> 196 <EvaluationSidebar::Detail 197 @statechart={{this.statechart}} 198 @fns={{hash 199 closeSidebar=this.closeSidebar 200 handleEvaluationClick=this.handleEvaluationClick 201 }} 202 /> 203 </section>