Skip to content

Commit

Permalink
ui: Support ingress gateways upstreams with multiple addresses (#8185)
Browse files Browse the repository at this point in the history
* Upgrade consul-api-double to version 3.1.2

* Display multiple addresses for ingress gateway upstreams
  • Loading branch information
kaxcode authored Jun 25, 2020
1 parent 7041f69 commit 5dd923e
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
12 changes: 7 additions & 5 deletions ui-v2/app/components/consul-upstream-instance-list/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@
{{/if}}
{{#if (gt item.LocalBindPort 0)}}
{{#let (concat (or item.LocalBindAddress '127.0.0.1') ':' item.LocalBindPort) as |combinedAddress|}}
<dl class="port">
<CopyButton
@value={{combinedAddress}}
@name="Address"
/>
<dl>
<dt>
<CopyButton
@value={{combinedAddress}}
@name="Address"
/>
</dt>
<dd>{{combinedAddress}}</dd>
</dl>
{{/let}}
Expand Down
20 changes: 12 additions & 8 deletions ui-v2/app/components/consul-upstream-list/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,18 @@
</dd>
</dl>
{{/if}}
{{#if (not-eq item.GatewayConfig.ListenerPort 0)}}
<dl class="port">
<CopyButton
@value={{item.GatewayConfig.ListenerPort}}
@name="Port"
/>
<dd>:{{item.GatewayConfig.ListenerPort}}</dd>
{{#if (gt item.GatewayConfig.Addresses.length 0)}}
{{#each item.GatewayConfig.Addresses as |address|}}
<dl>
<dt>
<CopyButton
@value={{address}}
@name="Address"
/>
</dt>
<dd>{{address}}</dd>
</dl>
{{/if}}
{{/each}}
{{/if}}
</BlockSlot>
</ListCollection>
2 changes: 1 addition & 1 deletion ui-v2/app/styles/components/composite-row/skin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,6 @@
}
// In this case we do not need a background on the icon
%composite-row .combined-address .copy-button button:hover,
%composite-row-detail .port .copy-button button:hover {
%composite-row-detail dt .copy-button button:hover {
background-color: transparent !important;
}
6 changes: 3 additions & 3 deletions ui-v2/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1211,9 +1211,9 @@
js-yaml "^3.13.1"

"@hashicorp/consul-api-double@^3.0.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@hashicorp/consul-api-double/-/consul-api-double-3.1.0.tgz#6f0cfc32d99b6f0c876d473ff8fdc489b7403904"
integrity sha512-TsRvkBJTzMaXlSyaFT4HU+Phhk+7K2kWPmnuM41cqkHsCLfoTllQ37avQyLYGM/57yfd0ajbI4M6IKoYJnQUWg==
version "3.1.2"
resolved "https://registry.yarnpkg.com/@hashicorp/consul-api-double/-/consul-api-double-3.1.2.tgz#3c3b929ab0f8aff5f503728337caf1c1a41171fb"
integrity sha512-igs6f9fiA+z2Us1oLZ49/sEU0WsL+s7a1pnwFtED2xdI8tn5hz9G0doYfOxmi04IifNxv80NVifl3rZl2rn2tw==

"@hashicorp/ember-cli-api-double@^3.1.0":
version "3.1.0"
Expand Down

0 comments on commit 5dd923e

Please sign in to comment.