2020-01-28 14:25:52 +00:00
|
|
|
{{title 'Namespaces'}}
|
2020-08-11 17:02:51 +00:00
|
|
|
{{#let (or sortBy "Name:asc") as |sort|}}
|
2020-06-17 13:19:50 +00:00
|
|
|
<EventSource @src={{items}} />
|
2020-02-19 19:26:38 +00:00
|
|
|
<AppView @class="nspace list" @loading={{isLoading}}>
|
|
|
|
<BlockSlot @name="notification" as |status type subject|>
|
2019-12-17 18:47:37 +00:00
|
|
|
{{partial 'dc/nspaces/notifications'}}
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="header">
|
2019-12-17 18:47:37 +00:00
|
|
|
<h1>
|
|
|
|
Namespaces
|
|
|
|
</h1>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="actions">
|
2019-12-17 18:47:37 +00:00
|
|
|
<a data-test-create href="{{href-to 'dc.nspaces.create'}}" class="type-create">Create</a>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
2020-08-10 14:54:51 +00:00
|
|
|
<BlockSlot @name="toolbar">
|
|
|
|
{{#if (gt items.length 0)}}
|
2020-08-11 17:02:51 +00:00
|
|
|
<SearchBar
|
|
|
|
@value={{search}}
|
|
|
|
@onsearch={{action (mut search) value="target.value"}}
|
|
|
|
class="with-sort"
|
|
|
|
>
|
|
|
|
<BlockSlot @name="secondary">
|
|
|
|
<PopoverSelect
|
|
|
|
@position="right"
|
|
|
|
@onchange={{action (mut sortBy) value='target.selected'}}
|
|
|
|
@multiple={{false}}
|
|
|
|
as |components|>
|
|
|
|
<BlockSlot @name="selected">
|
|
|
|
<span>
|
|
|
|
{{#let (from-entries (array
|
|
|
|
(array "Name:asc" "A to Z")
|
|
|
|
(array "Name:desc" "Z to A")
|
|
|
|
))
|
|
|
|
as |selectable|
|
|
|
|
}}
|
|
|
|
{{get selectable sort}}
|
|
|
|
{{/let}}
|
|
|
|
</span>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="options">
|
|
|
|
{{#let components.Optgroup components.Option as |Optgroup Option|}}
|
|
|
|
<Optgroup @label="Name">
|
|
|
|
<Option @value="Name:asc" @selected={{eq "Name:asc" sort}}>A to Z</Option>
|
|
|
|
<Option @value="Name:desc" @selected={{eq "Name:desc" sort}}>Z to A</Option>
|
|
|
|
</Optgroup>
|
|
|
|
{{/let}}
|
|
|
|
</BlockSlot>
|
|
|
|
</PopoverSelect>
|
|
|
|
</BlockSlot>
|
|
|
|
</SearchBar>
|
2020-08-10 14:54:51 +00:00
|
|
|
{{/if}}
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
2020-08-11 17:02:51 +00:00
|
|
|
{{#let (sort-by (comparator 'nspace' sort) items) as |sorted|}}
|
2020-08-10 14:54:51 +00:00
|
|
|
<ChangeableSet @dispatcher={{searchable 'nspace' sorted}} @terms={{search}}>
|
|
|
|
<BlockSlot @name="set" as |filtered|>
|
2020-07-20 17:12:34 +00:00
|
|
|
<ConsulNspaceList
|
|
|
|
@items={{filtered}}
|
|
|
|
@ondelete={{queue (action send 'delete')}}
|
|
|
|
>
|
|
|
|
<EmptyState @allowLogin={{true}}>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h2>
|
|
|
|
{{#if (gt items.length 0)}}
|
|
|
|
No namespaces found
|
|
|
|
{{else}}
|
|
|
|
Welcome to Namespaces
|
|
|
|
{{/if}}
|
|
|
|
</h2>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="body">
|
|
|
|
<p>
|
|
|
|
{{#if (gt items.length 0)}}
|
|
|
|
No namespaces where found matching that search, or you may not have access to view the namespaces you are searching for.
|
|
|
|
{{else}}
|
|
|
|
There don't seem to be any namespaces, or you may not have access to view namespaces yet.
|
|
|
|
{{/if}}
|
|
|
|
</p>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="actions">
|
|
|
|
<li class="docs-link">
|
|
|
|
<a href="{{env 'CONSUL_DOCS_URL'}}/commands/namespace" rel="noopener noreferrer" target="_blank">Documentation on namespaces</a>
|
|
|
|
</li>
|
|
|
|
<li class="learn-link">
|
|
|
|
<a href="{{env 'CONSUL_DOCS_LEARN_URL'}}/consul/namespaces/secure-namespaces" rel="noopener noreferrer" target="_blank">Read the guide</a>
|
|
|
|
</li>
|
|
|
|
</BlockSlot>
|
|
|
|
</EmptyState>
|
|
|
|
</ConsulNspaceList>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</ChangeableSet>
|
2020-08-10 14:54:51 +00:00
|
|
|
{{/let}}
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|
2020-08-10 14:54:51 +00:00
|
|
|
{{/let}}
|