2023-03-14 13:18:55 +00:00
|
|
|
{{!
|
|
|
|
Copyright (c) HashiCorp, Inc.
|
2023-08-11 13:12:13 +00:00
|
|
|
SPDX-License-Identifier: BUSL-1.1
|
2023-03-14 13:18:55 +00:00
|
|
|
}}
|
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
<Route
|
|
|
|
@name={{routeName}}
|
|
|
|
as |route|>
|
|
|
|
<div class="tab-section">
|
|
|
|
{{#let
|
2021-01-25 18:13:54 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
(hash
|
|
|
|
value=(or sortBy "DestinationName:asc")
|
|
|
|
change=(action (mut sortBy) value="target.selected")
|
|
|
|
)
|
2021-01-25 18:13:54 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
(hash
|
|
|
|
searchproperty=(hash
|
|
|
|
value=(if (not-eq searchproperty undefined)
|
|
|
|
(split searchproperty ',')
|
|
|
|
searchProperties
|
|
|
|
)
|
|
|
|
change=(action (mut searchproperty) value="target.selectedItems")
|
|
|
|
default=searchProperties
|
2021-01-25 18:13:54 +00:00
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2021-12-06 11:06:33 +00:00
|
|
|
(or route.params.partition route.model.user.token.Partition 'default')
|
|
|
|
(or route.params.nspace route.model.user.token.Namespace 'default')
|
2021-09-15 18:50:11 +00:00
|
|
|
route.params.dc
|
2021-12-06 11:06:33 +00:00
|
|
|
|
2021-09-15 18:50:11 +00:00
|
|
|
route.model.proxy
|
2022-01-07 19:16:21 +00:00
|
|
|
route.model.meta
|
2021-09-15 18:50:11 +00:00
|
|
|
route.model.proxy.Service.Proxy.Upstreams
|
2021-01-25 18:13:54 +00:00
|
|
|
|
2022-01-07 19:16:21 +00:00
|
|
|
as |sort filters partition nspace dc proxy meta items|}}
|
2021-04-06 12:40:40 +00:00
|
|
|
{{#if (gt items.length 0)}}
|
|
|
|
<input type="checkbox" id="toolbar-toggle" />
|
|
|
|
<Consul::UpstreamInstance::SearchBar
|
|
|
|
@search={{search}}
|
|
|
|
@onsearch={{action (mut search) value="target.value"}}
|
|
|
|
@searchproperties={{searchProperties}}
|
2020-11-12 18:45:11 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
@sort={{sort}}
|
2020-12-09 19:12:17 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
@filter={{filters}}
|
2021-01-05 10:04:03 +00:00
|
|
|
/>
|
2021-04-06 12:40:40 +00:00
|
|
|
{{/if}}
|
2022-01-07 19:16:21 +00:00
|
|
|
{{! TODO: Looks like we can get this straight from item.Proxy.Mode }}
|
|
|
|
{{! the less we need `proxy` and `meta` the better }}
|
|
|
|
{{#if (eq meta.ServiceProxy.Mode 'transparent')}}
|
2023-02-25 04:07:12 +00:00
|
|
|
<Hds::Alert @type="inline" @color="warning" class="mb-3 mt-2" as |A|>
|
|
|
|
<A.Title>{{t "routes.dc.services.instance.upstreams.tproxy-mode.header"}}</A.Title>
|
|
|
|
<A.Description>
|
|
|
|
{{t "routes.dc.services.instance.upstreams.tproxy-mode.body"}}
|
|
|
|
</A.Description>
|
|
|
|
<A.Link::Standalone
|
|
|
|
@text={{t "routes.dc.services.instance.upstreams.tproxy-mode.footer.text"}}
|
|
|
|
@href='{{concat (env 'CONSUL_DOCS_URL') (t "routes.dc.services.instance.upstreams.tproxy-mode.footer.link")}}'
|
|
|
|
@icon="docs-link"
|
|
|
|
@iconPosition="trailing"
|
|
|
|
@size="small"
|
|
|
|
/>
|
|
|
|
</Hds::Alert>
|
2021-04-28 18:06:18 +00:00
|
|
|
{{/if}}
|
2021-04-06 12:40:40 +00:00
|
|
|
<DataCollection
|
|
|
|
@type="upstream-instance"
|
|
|
|
@sort={{sort.value}}
|
|
|
|
@filters={{filters}}
|
|
|
|
@search={{search}}
|
|
|
|
@items={{items}}
|
|
|
|
as |collection|>
|
|
|
|
<collection.Collection>
|
|
|
|
<Consul::UpstreamInstance::List
|
|
|
|
@items={{collection.items}}
|
|
|
|
@dc={{dc}}
|
|
|
|
@nspace={{nspace}}
|
2021-11-17 17:46:50 +00:00
|
|
|
@partition={{partition}}
|
2021-04-06 12:40:40 +00:00
|
|
|
/>
|
|
|
|
</collection.Collection>
|
|
|
|
<collection.Empty>
|
|
|
|
<EmptyState>
|
|
|
|
<BlockSlot @name="body">
|
2022-04-11 11:49:59 +00:00
|
|
|
{{t "routes.dc.services.instance.upstreams.empty"
|
|
|
|
items=items.length
|
|
|
|
htmlSafe=true
|
|
|
|
}}
|
2021-04-06 12:40:40 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</EmptyState>
|
|
|
|
</collection.Empty>
|
|
|
|
</DataCollection>
|
|
|
|
{{/let}}
|
|
|
|
</div>
|
|
|
|
</Route>
|