github.com/hernad/nomad@v1.6.112/ui/app/components/allocation-service-sidebar.hbs (about) 1 {{! 2 Copyright (c) HashiCorp, Inc. 3 SPDX-License-Identifier: MPL-2.0 4 ~}} 5 6 <div 7 class="sidebar has-subnav service-sidebar {{if this.isSideBarOpen "open"}}" 8 {{on-click-outside 9 @fns.closeSidebar 10 capture=true 11 }} 12 > 13 {{#if @service}} 14 {{keyboard-commands this.keyCommands}} 15 <header class="detail-header"> 16 <h1 class="title"> 17 {{@service.name}} 18 {{#if (not-eq @service.provider "consul")}} 19 <span class="aggregate-status"> 20 {{#if (eq this.aggregateStatus 'Unhealthy')}} 21 <FlightIcon @name="x-square-fill" @color="#c84034" /> 22 Unhealthy 23 {{else if (eq this.aggregateStatus 'Unknown')}} 24 <Tooltip @text="The parent allocation for this service is not running" @isFullText={{true}}> 25 <FlightIcon @name="help" @color="#999999" /> 26 Health Unknown 27 </Tooltip> 28 {{else}} 29 <FlightIcon @name="check-square-fill" @color="#25ba81" /> 30 Healthy 31 {{/if}} 32 </span> 33 {{/if}} 34 </h1> 35 <button 36 data-test-close-service-sidebar 37 class="button is-borderless" 38 type="button" 39 {{on "click" @fns.closeSidebar}} 40 > 41 {{x-icon "cancel"}} 42 </button> 43 </header> 44 45 <div class="boxed-section is-small"> 46 <div 47 class="boxed-section-body inline-definitions" 48 > 49 <span class="label"> 50 Service Details 51 </span> 52 53 <div> 54 {{#if @service.connect}} 55 <span class="pair"> 56 <span class="term"> 57 Connect 58 </span> 59 <span>True</span> 60 </span> 61 {{/if}} 62 <span class="pair"> 63 <span class="term"> 64 Allocation 65 </span> 66 <LinkTo 67 @route="allocations.allocation" 68 @model={{@allocation}} 69 @query={{hash service=""}} 70 > 71 {{@allocation.shortId}} 72 </LinkTo> 73 </span> 74 <span class="pair"> 75 <span class="term"> 76 IP Address & Port 77 </span> 78 <a 79 href="http://{{this.address}}" 80 target="_blank" 81 rel="noopener noreferrer" 82 > 83 {{this.address}} 84 </a> 85 </span> 86 <span class="pair"> 87 <span class="term"> 88 Client 89 </span> 90 <Tooltip @text={{@allocation.node.name}}> 91 <LinkTo 92 @route="clients.client" 93 @model={{@allocation.node}} 94 > 95 {{@allocation.node.shortId}} 96 </LinkTo> 97 </Tooltip> 98 </span> 99 {{#if @service.tags.length}} 100 <span class="pair is-wrappable"> 101 <span class="term"> 102 Tags 103 </span> 104 {{#each @service.tags as |tag|}} 105 <span class="tag is-service">{{tag}}</span> 106 {{/each}} 107 {{#each @service.canary_tags as |tag|}} 108 <span class="tag canary is-service">{{tag}}</span> 109 {{/each}} 110 </span> 111 {{/if}} 112 </div> 113 </div> 114 </div> 115 {{#if this.checks.length}} 116 <ListTable class="health-checks" @source={{this.checks}} as |t|> 117 <t.head> 118 <th class="name"> 119 Check Name 120 </th> 121 <th class="status"> 122 Status 123 </th> 124 <td class="output"> 125 Output 126 </td> 127 </t.head> 128 <t.body as |row|> 129 <tr data-service-health={{row.model.Status}}> 130 <td class="name"> 131 <span title={{row.model.Check}}>{{row.model.Check}}</span> 132 </td> 133 <td class="status"> 134 <span> 135 {{#if (eq row.model.Status "success")}} 136 <FlightIcon @name="check-square-fill" @color="#25ba81" /> 137 Healthy 138 {{else if (eq row.model.Status "failure")}} 139 <FlightIcon @name="x-square-fill" @color="#c84034" /> 140 Unhealthy 141 {{else if (eq row.model.Status "pending")}} 142 Pending 143 {{/if}} 144 </span> 145 </td> 146 <td class="service-output"> 147 <code> 148 {{row.model.Output}} 149 </code> 150 </td> 151 </tr> 152 <tr class="service-status-indicators"> 153 <td colspan="3"> 154 <div> 155 {{#each (dedupe-by-property (filter-by "Check" row.model.Check @service.healthChecks) prop="Timestamp") as |check|}} 156 <ServiceStatusIndicator @check={{check}} /> 157 {{/each}} 158 </div> 159 </td> 160 </tr> 161 </t.body> 162 </ListTable> 163 {{/if}} 164 {{#if (eq @service.provider "consul")}} 165 <table class="table is-fixed connect-info"> 166 <tbody> 167 {{#if @service.onUpdate}} 168 <tr> 169 <td><strong>On Update</strong></td> 170 <td>{{@service.onUpdate}}</td> 171 </tr> 172 {{/if}} 173 {{#if @service.connect.sidecarService.proxy.upstreams}} 174 <tr> 175 <td><strong>Upstreams</strong></td> 176 <td> 177 {{#each 178 @service.connect.sidecarService.proxy.upstreams as |upstream| 179 }} 180 <span class="tag">{{upstream.destinationName}}:{{upstream.localBindPort}}</span> 181 {{/each}} 182 </td> 183 </tr> 184 {{/if}} 185 </tbody> 186 </table> 187 {{/if}} 188 {{#if (and (eq @service.provider "consul") this.consulRedirectLink)}} 189 <div data-test-consul-link-notice class="notification is-info"> 190 <p> 191 Nomad cannot read health check information from Consul services, but you can <a href={{this.consulRedirectLink}} target="_blank" rel="noopener noreferrer">view this information in your Consul UI</a>. 192 </p> 193 </div> 194 {{/if}} 195 {{/if}} 196 </div>