2021-02-17 21:01:44 +00:00
|
|
|
{{page-title "Clients"}}
|
2018-07-25 22:02:49 +00:00
|
|
|
<section class="section">
|
2020-07-09 20:19:07 +00:00
|
|
|
{{#if this.isForbidden}}
|
2020-07-09 16:37:00 +00:00
|
|
|
<ForbiddenMessage />
|
2018-07-25 22:02:49 +00:00
|
|
|
{{else}}
|
2019-03-07 05:05:59 +00:00
|
|
|
<div class="toolbar">
|
2019-05-15 18:25:30 +00:00
|
|
|
<div class="toolbar-item">
|
2020-07-09 20:19:07 +00:00
|
|
|
{{#if this.nodes.length}}
|
2020-06-01 19:03:56 +00:00
|
|
|
<SearchBox
|
2020-07-09 20:19:07 +00:00
|
|
|
@searchTerm={{mut this.searchTerm}}
|
|
|
|
@onChange={{action this.resetPagination}}
|
2020-06-01 19:03:56 +00:00
|
|
|
@placeholder="Search clients..." />
|
2019-05-15 18:25:30 +00:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2019-03-07 05:05:59 +00:00
|
|
|
<div class="toolbar-item is-right-aligned is-mobile-full-width">
|
|
|
|
<div class="button-bar">
|
2020-06-01 19:03:56 +00:00
|
|
|
<MultiSelectDropdown
|
2019-02-12 19:26:36 +00:00
|
|
|
data-test-class-facet
|
2020-06-01 19:03:56 +00:00
|
|
|
@label="Class"
|
2020-07-09 20:19:07 +00:00
|
|
|
@options={{this.optionsClass}}
|
|
|
|
@selection={{this.selectionClass}}
|
|
|
|
@onSelect={{action this.setFacetQueryParam "qpClass"}} />
|
2020-06-01 19:03:56 +00:00
|
|
|
<MultiSelectDropdown
|
2019-06-19 17:11:17 +00:00
|
|
|
data-test-state-facet
|
2020-06-01 19:03:56 +00:00
|
|
|
@label="State"
|
2020-07-09 20:19:07 +00:00
|
|
|
@options={{this.optionsState}}
|
|
|
|
@selection={{this.selectionState}}
|
|
|
|
@onSelect={{action this.setFacetQueryParam "qpState"}} />
|
2020-06-01 19:03:56 +00:00
|
|
|
<MultiSelectDropdown
|
2019-02-12 19:26:36 +00:00
|
|
|
data-test-datacenter-facet
|
2020-06-01 19:03:56 +00:00
|
|
|
@label="Datacenter"
|
2020-07-09 20:19:07 +00:00
|
|
|
@options={{this.optionsDatacenter}}
|
|
|
|
@selection={{this.selectionDatacenter}}
|
|
|
|
@onSelect={{action this.setFacetQueryParam "qpDatacenter"}} />
|
2020-06-01 19:03:56 +00:00
|
|
|
<MultiSelectDropdown
|
2020-03-13 07:18:05 +00:00
|
|
|
data-test-volume-facet
|
2020-06-01 19:03:56 +00:00
|
|
|
@label="Volume"
|
2020-07-09 20:19:07 +00:00
|
|
|
@options={{this.optionsVolume}}
|
|
|
|
@selection={{this.selectionVolume}}
|
|
|
|
@onSelect={{action this.setFacetQueryParam "qpVolume"}} />
|
2019-02-12 04:01:46 +00:00
|
|
|
</div>
|
2018-07-25 22:02:49 +00:00
|
|
|
</div>
|
2019-02-12 04:01:46 +00:00
|
|
|
</div>
|
2020-07-09 20:19:07 +00:00
|
|
|
{{#if this.sortedNodes}}
|
2020-06-01 19:03:56 +00:00
|
|
|
<ListPagination
|
2020-07-09 20:19:07 +00:00
|
|
|
@source={{this.sortedNodes}}
|
|
|
|
@size={{this.pageSize}}
|
|
|
|
@page={{this.currentPage}} as |p|>
|
2020-06-01 19:03:56 +00:00
|
|
|
<ListTable
|
|
|
|
@source={{p.list}}
|
2020-07-09 20:19:07 +00:00
|
|
|
@sortProperty={{this.sortProperty}}
|
|
|
|
@sortDescending={{this.sortDescending}}
|
2020-06-01 19:03:56 +00:00
|
|
|
@class="with-foot" as |t|>
|
|
|
|
<t.head>
|
2019-10-24 12:05:43 +00:00
|
|
|
<th class="is-narrow"></th>
|
2020-06-01 19:03:56 +00:00
|
|
|
<t.sort-by @prop="id">ID</t.sort-by>
|
|
|
|
<t.sort-by @class="is-200px is-truncatable" @prop="name">Name</t.sort-by>
|
|
|
|
<t.sort-by @prop="compositeStatus">State</t.sort-by>
|
2019-10-24 12:05:43 +00:00
|
|
|
<th>Address</th>
|
2020-06-01 19:03:56 +00:00
|
|
|
<t.sort-by @prop="datacenter">Datacenter</t.sort-by>
|
2020-02-12 03:52:04 +00:00
|
|
|
<th># Volumes</th>
|
2019-10-24 12:05:43 +00:00
|
|
|
<th># Allocs</th>
|
2020-06-01 19:03:56 +00:00
|
|
|
</t.head>
|
|
|
|
<t.body as |row|>
|
|
|
|
<ClientNodeRow data-test-client-node-row @node={{row.model}} @onClick={{action "gotoNode" row.model}} />
|
|
|
|
</t.body>
|
|
|
|
</ListTable>
|
2019-10-24 12:05:43 +00:00
|
|
|
<div class="table-foot">
|
2020-07-09 20:19:07 +00:00
|
|
|
<PageSizeSelect @onChange={{action this.resetPagination}} />
|
2019-10-24 12:05:43 +00:00
|
|
|
<nav class="pagination" data-test-pagination>
|
|
|
|
<div class="pagination-numbers">
|
2020-07-09 20:19:07 +00:00
|
|
|
{{p.startsAt}}–{{p.endsAt}} of {{this.sortedNodes.length}}
|
2019-10-24 12:05:43 +00:00
|
|
|
</div>
|
2020-06-01 19:03:56 +00:00
|
|
|
<p.prev @class="pagination-previous">{{x-icon "chevron-left"}}</p.prev>
|
|
|
|
<p.next @class="pagination-next">{{x-icon "chevron-right"}}</p.next>
|
2019-10-24 12:05:43 +00:00
|
|
|
<ul class="pagination-list"></ul>
|
|
|
|
</nav>
|
|
|
|
</div>
|
2020-06-01 19:03:56 +00:00
|
|
|
</ListPagination>
|
2017-09-30 01:33:57 +00:00
|
|
|
{{else}}
|
2018-07-25 22:02:49 +00:00
|
|
|
<div class="empty-message" data-test-empty-clients-list>
|
2020-07-09 20:19:07 +00:00
|
|
|
{{#if (eq this.nodes.length 0)}}
|
2018-07-25 22:02:49 +00:00
|
|
|
<h3 class="empty-message-headline" data-test-empty-clients-list-headline>No Clients</h3>
|
|
|
|
<p class="empty-message-body">
|
|
|
|
The cluster currently has no client nodes.
|
|
|
|
</p>
|
2020-07-09 20:19:07 +00:00
|
|
|
{{else if (eq this.filteredNodes.length 0)}}
|
2019-02-12 19:26:36 +00:00
|
|
|
<h3 data-test-empty-clients-list-headline class="empty-message-headline">No Matches</h3>
|
|
|
|
<p class="empty-message-body">
|
|
|
|
No clients match your current filter selection.
|
|
|
|
</p>
|
2020-07-09 20:19:07 +00:00
|
|
|
{{else if this.searchTerm}}
|
2018-07-25 22:02:49 +00:00
|
|
|
<h3 class="empty-message-headline" data-test-empty-clients-list-headline>No Matches</h3>
|
2020-07-09 20:19:07 +00:00
|
|
|
<p class="empty-message-body">No clients match the term <strong>{{this.searchTerm}}</strong></p>
|
2018-07-25 22:02:49 +00:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2019-10-24 12:05:43 +00:00
|
|
|
{{/if}}
|
2018-07-25 22:02:49 +00:00
|
|
|
{{/if}}
|
|
|
|
</section>
|