consul/ui-v2/app/templates/dc/nspaces/index.hbs

62 lines
2.2 KiB
Handlebars

{{title 'Namespaces'}}
<EventSource @src={{items}} />
<AppView @class="nspace list" @loading={{isLoading}}>
<BlockSlot @name="notification" as |status type subject|>
{{partial 'dc/nspaces/notifications'}}
</BlockSlot>
<BlockSlot @name="header">
<h1>
Namespaces
</h1>
</BlockSlot>
<BlockSlot @name="actions">
<a data-test-create href="{{href-to 'dc.nspaces.create'}}" class="type-create">Create</a>
</BlockSlot>
<BlockSlot @name="content">
{{#if (gt items.length 0) }}
<SearchBar
@placeholder="Search by name"
@value={{search}}
@onsearch={{action (mut search) value="target.value"}}
/>
{{/if}}
<ChangeableSet @dispatcher={{searchable 'nspace' items}} @terms={{search}}>
<BlockSlot @name="content" as |filtered|>
<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>
</BlockSlot>
</ChangeableSet>
</BlockSlot>
</AppView>