open-nomad/ui/app/templates/jobs/job/services/service.hbs
Jai 87a3bd5393
bug: hitting refresh on /jobs/:jobId/services/:serviceId doesn't display data (#15431)
* ui: create id helper

* refact: handle async relationships

* chore: prettify template

* ui: helper async escape hatch

* refact: use escape hatch for tooltip
2022-12-01 10:45:31 -05:00

46 lines
1.3 KiB
Handlebars

<section class="section service-list">
<h1 class="title">
<LinkTo class="back-link" @route="jobs.job.services">
<FlightIcon @name="chevron-left" @title="Back to services" @size="24" />
</LinkTo>
{{this.model.name}}
</h1>
<ListTable @source={{this.model.instances}} as |t|>
<t.head>
<th>Allocation</th>
<th>Client</th>
<th>IP Address &amp; Port</th>
</t.head>
<t.body as |row|>
<tr data-test-service-row>
{{#let (format-id row.model "allocation") as |allocation|}}
<td
{{keyboard-shortcut
enumerated=true
action=(action "gotoAllocation" row.model.allocation)
}}
>
<LinkTo
@route="allocations.allocation"
@model={{allocation.id}}
>{{allocation.shortId}}</LinkTo>
</td>
{{/let}}
{{#let (async-escape-hatch row.model "node") as |node|}}
<td>
<Tooltip @text={{node.name}}>
<LinkTo
@route="clients.client"
@model={{node.id}}
>{{node.shortId}}</LinkTo>
</Tooltip>
</td>
{{/let}}
<td>
{{row.model.address}}:{{row.model.port}}
</td>
</tr>
</t.body>
</ListTable>
</section>