[ui] Show Consul Connect upstreams / on update info in sidebar (#15324)

* Added consul connect icon and sidebar info

* Show icon to the right of name
This commit is contained in:
Phil Renaud 2022-11-18 22:49:10 -05:00 committed by GitHub
parent eaf842b226
commit 11dc19b307
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 0 deletions

3
.changelog/15324.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:improvement
ui: add consul connect service upstream and on-update info to the service sidebar
```

View File

@ -41,6 +41,14 @@
</span> </span>
<div> <div>
{{#if @service.connect}}
<span class="pair">
<span class="term">
Connect
</span>
<span>True</span>
</span>
{{/if}}
<span class="pair"> <span class="pair">
<span class="term"> <span class="term">
Allocation Allocation
@ -140,6 +148,30 @@
</t.body> </t.body>
</ListTable> </ListTable>
{{/if}} {{/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)}} {{#if (and (eq @service.provider "consul") this.consulRedirectLink)}}
<div data-test-consul-link-notice class="notification is-info"> <div data-test-consul-link-notice class="notification is-info">
<p> <p>

View File

@ -301,6 +301,9 @@
<FlightIcon @name="nomad-color" /> <FlightIcon @name="nomad-color" />
{{else}} {{else}}
<FlightIcon @name="consul-color" /> <FlightIcon @name="consul-color" />
{{#if row.model.connect}}
<FlightIcon @name="mesh" @color="#444444" />
{{/if}}
{{/if}} {{/if}}
</td> </td>
<td data-test-service-name class="is-long-text"> <td data-test-service-name class="is-long-text">

View File

@ -25,6 +25,9 @@
{{else}} {{else}}
{{@service.name}} {{@service.name}}
{{/if}} {{/if}}
{{#if @service.connect}}
<FlightIcon @name="mesh" @color="#444444" />
{{/if}}
{{/if}} {{/if}}
</td> </td>
<td> <td>