Skip to content

Commit

Permalink
[ui] Show Consul Connect upstreams / on update info in sidebar (#15324)
Browse files Browse the repository at this point in the history
* Added consul connect icon and sidebar info

* Show icon to the right of name
  • Loading branch information
philrenaud committed Nov 19, 2022
1 parent 78593da commit 4703f55
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/15324.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
ui: add consul connect service upstream and on-update info to the service sidebar
```
32 changes: 32 additions & 0 deletions ui/app/components/allocation-service-sidebar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@
</span>

<div>
{{#if @service.connect}}
<span class="pair">
<span class="term">
Connect
</span>
<span>True</span>
</span>
{{/if}}
<span class="pair">
<span class="term">
Allocation
Expand Down Expand Up @@ -140,6 +148,30 @@
</t.body>
</ListTable>
{{/if}}
{{#if (eq @service.provider "consul")}}
<table class="table is-fixed connect-info">
<tbody>
{{#if @service.onUpdate}}
<tr>
<td><strong>On Update</strong></td>
<td>{{@service.onUpdate}}</td>
</tr>
{{/if}}
{{#if @service.connect.sidecarService.proxy.upstreams}}
<tr>
<td><strong>Upstreams</strong></td>
<td>
{{#each
@service.connect.sidecarService.proxy.upstreams as |upstream|
}}
<span class="tag">{{upstream.destinationName}}:{{upstream.localBindPort}}</span>
{{/each}}
</td>
</tr>
{{/if}}
</tbody>
</table>
{{/if}}
{{#if (and (eq @service.provider "consul") this.consulRedirectLink)}}
<div data-test-consul-link-notice class="notification is-info">
<p>
Expand Down
3 changes: 3 additions & 0 deletions ui/app/templates/allocations/allocation/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@
<FlightIcon @name="nomad-color" />
{{else}}
<FlightIcon @name="consul-color" />
{{#if row.model.connect}}
<FlightIcon @name="mesh" @color="#444444" />
{{/if}}
{{/if}}
</td>
<td data-test-service-name class="is-long-text">
Expand Down
3 changes: 3 additions & 0 deletions ui/app/templates/components/job-service-row.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
{{else}}
{{@service.name}}
{{/if}}
{{#if @service.connect}}
<FlightIcon @name="mesh" @color="#444444" />
{{/if}}
{{/if}}
</td>
<td>
Expand Down

0 comments on commit 4703f55

Please sign in to comment.