Use translations for empty states peers.show

This commit is contained in:
Michael Klein 2022-10-12 13:34:23 +02:00
parent 35d8035258
commit f2e0df1534
4 changed files with 53 additions and 44 deletions

View File

@ -5,13 +5,11 @@
<EmptyState @login={{route.model.app.login.open}}>
<BlockSlot @name="header">
<h2>
No server addresses.
{{t "routes.dc.peers.show.addresses.empty.header"}}
</h2>
</BlockSlot>
<BlockSlot @name="body">
<div>
There don't seem to be any server addresses for this peer.
</div>
{{t "routes.dc.peers.show.addresses.empty.body" htmlSafe=true}}
</BlockSlot>
<BlockSlot @name="actions">
<li class="docs-link">

View File

@ -79,28 +79,19 @@
<EmptyState @login={{route.model.app.login.open}}>
<BlockSlot @name="header">
<h2>
No visible exported services to
{{route.model.peer.Name}}
{{t
"routes.dc.peers.show.exported.empty.header"
name=route.model.peer.Name
}}
</h2>
</BlockSlot>
<BlockSlot @name="body">
{{#if items.length}}
<div>
No services where found matching that search, or you
may not have access to view the services you are
searching for.
</div>
{{else}}
<div>
Services must be exported from one peer to another to
enable service communication across two peers. There
don't seem to be any services exported to
{{route.model.peer.Name}}
yet, or you may not have
<code>services:read</code>
permissions to access to this view.
</div>
{{/if}}
{{t
"routes.dc.peers.show.exported.empty.body"
items=items.length
name=route.model.peer.Name
htmlSafe=true
}}
</BlockSlot>
<BlockSlot @name="actions">
<li class="docs-link">

View File

@ -85,25 +85,19 @@
<EmptyState @login={{route.model.app.login.open}}>
<BlockSlot @name="header">
<h2>
No visible imported services from
{{route.model.peer.Name}}
{{t
"routes.dc.peers.show.imported.empty.header"
name=route.model.peer.Name
}}
</h2>
</BlockSlot>
<BlockSlot @name="body">
{{#if items.length}}
<div>
No services where found matching that search, or you may not
have access to view the services you are searching for.
</div>
{{else}}
<div>Services must be exported from one peer to another to
enable service communication across two peers. There don't
seem to be any services imported from
{{route.model.peer.Name}}
yet, or you may not have
<code>service:read</code>
permissions to access to this view.</div>
{{/if}}
{{t
"routes.dc.peers.show.imported.empty.body"
items=items.length
name=route.model.peer.Name
htmlSafe=true
}}
</BlockSlot>
<BlockSlot @name="actions">
<li class="docs-link">

View File

@ -117,10 +117,10 @@ dc:
index:
empty:
header: |
{items, select,
0 {Welcome to Peers}
other {No peers found}
}
{items, select,
0 {Welcome to Peers}
other {No peers found}
}
body: |
{items, select,
0 {Cluster peering is the recommended way to connect services across or within Consul datacenters. Peering is a one-to-one relationship in which each peer is either a open-source Consul datacenter or a Consul enterprise admin partition. There don't seem to be any peers for this {canUsePartitions, select,
@ -145,6 +145,32 @@ dc:
tab-tooltip: Services exported from {name}
addresses:
tooltip: The number of services exported from {name}
show:
imported:
empty:
header: No visible imported services from {name}
body: |
<div>
{items, select,
0 {Services must be exported from one peer to another to enable service communication across two peers. There don't seem to be any services imported from {name} yet, or you may not have <code>services:read</code> permissions to access to this view.}
other {No services where found matching that search, or you may not have access to view the services you are searching for.}
}
</div>
exported:
empty:
header: No visible exported services to {name}
body: |
<div>
{items, select,
0 {Services must be exported from one peer to another to enable service communication across two peers. There don't seem to be any services exported to {name} yet, or you may not have <code>services:read</code> permissions to access to this view.}
other {No services where found matching that search, or you may not have access to view the services you are searching for.}
}
</div>
addresses:
empty:
header: No server adddresses.
body: <div>There don't seem to be any server addresses for this peer.</div>
partitions:
index:
empty: