ba5ae14b6c
* Added to subnav and basic table implemented * Existing services become service fragments, and services tab aggregated beneath job route * Index page within jobs/job/services * Watchable services * Lintfixes * Links to clients and individual services set up * Child service route * Keyboard shortcuts on service page * Model that shows consul services as well, plus level and provider cols * lintfix * Level as query param * Watch job for service name changes too * Lintfix * Testfixes * Placeholder mirage route
40 lines
1.1 KiB
Handlebars
40 lines
1.1 KiB
Handlebars
<tr {{on "click" (fn this.gotoService @service)}} class={{if (eq @service.provider "nomad") "is-interactive"}} data-test-service={{@service.id}}>
|
|
<td>
|
|
{{#if (eq @service.provider "nomad")}}
|
|
<FlightIcon @name="nomad-color" />
|
|
{{else if (eq @service.provider "consul")}}
|
|
<FlightIcon @name="consul-color" />
|
|
{{/if}}
|
|
</td>
|
|
<td
|
|
{{keyboard-shortcut
|
|
enumerated=true
|
|
action=(action "gotoService" @service)
|
|
}}
|
|
>
|
|
{{#if (eq @service.provider "nomad")}}
|
|
<LinkTo class="is-primary" @route="jobs.job.services.service" @model={{@service}} @query={{hash level=@service.level}}>{{@service.name}}</LinkTo>
|
|
{{else}}
|
|
{{@service.name}}
|
|
{{/if}}
|
|
</td>
|
|
<td>
|
|
{{@service.level}}
|
|
</td>
|
|
<td>
|
|
<LinkTo @route="clients.client" @model={{@service.instances.0.node.id}}>{{@service.instances.0.node.name}}</LinkTo>
|
|
</td>
|
|
<td>
|
|
{{#each @service.tags as |tag|}}
|
|
<span class="tag">{{tag}}</span>
|
|
{{/each}}
|
|
</td>
|
|
<td>
|
|
{{#if (eq @service.provider "nomad")}}
|
|
{{@service.instances.length}} {{pluralize "allocation" @service.instances.length}}
|
|
{{else}}
|
|
--
|
|
{{/if}}
|
|
</td>
|
|
</tr>
|