2020-01-28 14:25:52 +00:00
|
|
|
{{title 'Namespaces'}}
|
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>
|
|
|
|
<BlockSlot @name="content">
|
2019-12-17 18:47:37 +00:00
|
|
|
{{#if (gt items.length 0) }}
|
|
|
|
<form class="filter-bar">
|
2020-02-19 19:26:38 +00:00
|
|
|
<FreetextFilter @searchable={{searchable}} @value={{s}} @placeholder="Search" />
|
2019-12-17 18:47:37 +00:00
|
|
|
</form>
|
|
|
|
{{/if}}
|
2020-02-19 19:26:38 +00:00
|
|
|
<ChangeableSet @dispatcher={{searchable}}>
|
|
|
|
<BlockSlot @name="set" as |filtered|>
|
|
|
|
<TabularCollection @items={{filtered}} as |item index|>
|
|
|
|
<BlockSlot @name="header">
|
2019-12-17 18:47:37 +00:00
|
|
|
<th>Name</th>
|
|
|
|
<th>Description</th>
|
|
|
|
{{#if (env 'CONSUL_ACLS_ENABLED')}}
|
|
|
|
<th>Roles & Policies</th>
|
|
|
|
{{/if}}
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="row">
|
2019-12-17 18:47:37 +00:00
|
|
|
{{#if item.DeletedAt}}
|
|
|
|
<td class="no-actions" colspan="3">
|
|
|
|
<p>
|
|
|
|
Deleting {{item.Name}}...
|
|
|
|
</p>
|
|
|
|
</td>
|
|
|
|
{{else}}
|
|
|
|
<td data-test-namespace={{item.Name}}>
|
|
|
|
<a href={{href-to 'dc.nspaces.edit' item.Name}}>{{item.Name}}</a>
|
|
|
|
</td>
|
|
|
|
<td data-test-description>
|
|
|
|
<p>{{item.Description}}</p>
|
|
|
|
</td>
|
|
|
|
{{#if (env 'CONSUL_ACLS_ENABLED')}}
|
|
|
|
<td>
|
|
|
|
{{#each (compact (append item.ACLs.PolicyDefaults item.ACLs.RoleDefaults)) as |item|}}
|
|
|
|
<strong data-test-policy class={{policy/typeof item}}>{{item.Name}}</strong>
|
|
|
|
{{/each}}
|
|
|
|
</td>
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="actions" as |index change checked|>
|
|
|
|
<PopoverMenu @expanded={{if (eq checked index) true false}} @onchange={{action change index}} @keyboardAccess={{false}}>
|
|
|
|
<BlockSlot @name="trigger">
|
2020-01-22 12:08:29 +00:00
|
|
|
More
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="menu" as |confirm send keypressClick|>
|
2020-01-22 12:08:29 +00:00
|
|
|
<li role="none">
|
|
|
|
<a data-test-edit role="menuitem" tabindex="-1" href={{href-to 'dc.nspaces.edit' item.Name}}>Edit</a>
|
|
|
|
</li>
|
2020-01-24 12:26:28 +00:00
|
|
|
{{#if (not-eq item.Name 'default') }}
|
2020-01-22 12:08:29 +00:00
|
|
|
<li role="none" class="dangerous">
|
|
|
|
<label for={{confirm}} role="menuitem" tabindex="-1" onkeypress={{keypressClick}} data-test-delete>Delete</label>
|
|
|
|
<div role="menu">
|
|
|
|
<div class="confirmation-alert warning">
|
|
|
|
<div>
|
|
|
|
<header>
|
|
|
|
Confirm Delete
|
|
|
|
</header>
|
|
|
|
<p>
|
|
|
|
Are you sure you want to delete this key?
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<ul>
|
|
|
|
<li class="dangerous">
|
|
|
|
<button tabindex="-1" type="button" class="type-delete" onclick={{action send 'delete' item}}>Delete</button>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<label for={{confirm}}>Cancel</label>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
2020-01-24 12:26:28 +00:00
|
|
|
{{/if}}
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</PopoverMenu>
|
|
|
|
</BlockSlot>
|
|
|
|
</TabularCollection>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="empty">
|
2020-05-27 10:23:21 +00:00
|
|
|
<EmptyState @allowLogin={{true}}>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h2>Welcome to Namespaces</h2>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="body">
|
|
|
|
<p>
|
|
|
|
There don't seem to be any namespaces, or you may not have access to view namespaces yet.
|
|
|
|
</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>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</ChangeableSet>
|
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|