Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: Add TProxy Mode notice banner to service instance Upstreams tab #10136

Merged
merged 1 commit into from
Apr 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/10136.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
ui: Adding a notice about how TransparentProxy mode affects the Upstreams list at the top of tab view
```
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,30 @@ as |route|>
@filter={{filters}}
/>
{{/if}}
{{#if (eq proxy.ServiceProxy.Mode 'transparent')}}
<Notice
@type="warning"
as |notice|>
<notice.Header>
<h3>{{t "routes.dc.services.instance.upstreams.tproxy-mode.header"}}</h3>
</notice.Header>
<notice.Body>
<p>
{{t "routes.dc.services.instance.upstreams.tproxy-mode.body"}}
</p>
</notice.Body>
<notice.Footer>
<p>
<Action
@href={{concat (env 'CONSUL_DOCS_URL') '/connect/transparent-proxy'}}
@external={{true}}
>
{{t "routes.dc.services.instance.upstreams.tproxy-mode.footer"}}
</Action>
</p>
</notice.Footer>
</Notice>
{{/if}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to use a normal <Notice /> component here, (then we keep the h3 etc in the top level route template) would it be ok to change that out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johncowen Updated to use <Notice />

<DataCollection
@type="upstream-instance"
@sort={{sort.value}}
Expand Down
6 changes: 6 additions & 0 deletions ui/packages/consul-ui/translations/routes/en-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ dc:
<p>
Upstreams are services that may receive traffic from this gateway. If you are not using Consul DNS, please make sure your <code>Host:</code> header uses the correct domain name for the gateway to correctly proxy to its upstreams. Learn more about configuring gateways in our <a href="{CONSUL_DOCS_URL}/connect/ingress-gateways" target="_blank" rel="noopener noreferrer">documentation</a>.
</p>
instance:
upstreams:
tproxy-mode:
header: Transparent proxy mode
body: The upstreams listed on this page have been defined in a proxy registration. There may be more upstreams, though, as "transparent" mode is enabled on this proxy.
footer: Read the documentation