2019-07-17 20:02:58 +00:00
|
|
|
{{title "Clients"}}
|
2018-07-25 22:02:49 +00:00
|
|
|
<section class="section">
|
|
|
|
{{#if isForbidden}}
|
|
|
|
{{partial "partials/forbidden-message"}}
|
|
|
|
{{else}}
|
2019-03-07 05:05:59 +00:00
|
|
|
<div class="toolbar">
|
2019-05-15 18:25:30 +00:00
|
|
|
<div class="toolbar-item">
|
|
|
|
{{#if nodes.length}}
|
2020-06-01 19:03:56 +00:00
|
|
|
<SearchBox
|
|
|
|
@searchTerm={{mut searchTerm}}
|
|
|
|
@onChange={{action resetPagination}}
|
|
|
|
@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"
|
|
|
|
@options={{optionsClass}}
|
|
|
|
@selection={{selectionClass}}
|
|
|
|
@onSelect={{action setFacetQueryParam "qpClass"}} />
|
|
|
|
<MultiSelectDropdown
|
2019-06-19 17:11:17 +00:00
|
|
|
data-test-state-facet
|
2020-06-01 19:03:56 +00:00
|
|
|
@label="State"
|
|
|
|
@options={{optionsState}}
|
|
|
|
@selection={{selectionState}}
|
|
|
|
@onSelect={{action setFacetQueryParam "qpState"}} />
|
|
|
|
<MultiSelectDropdown
|
2019-02-12 19:26:36 +00:00
|
|
|
data-test-datacenter-facet
|
2020-06-01 19:03:56 +00:00
|
|
|
@label="Datacenter"
|
|
|
|
@options={{optionsDatacenter}}
|
|
|
|
@selection={{selectionDatacenter}}
|
|
|
|
@onSelect={{action setFacetQueryParam "qpDatacenter"}} />
|
|
|
|
<MultiSelectDropdown
|
2020-03-13 07:18:05 +00:00
|
|
|
data-test-volume-facet
|
2020-06-01 19:03:56 +00:00
|
|
|
@label="Volume"
|
|
|
|
@options={{optionsVolume}}
|
|
|
|
@selection={{selectionVolume}}
|
|
|
|
@onSelect={{action 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>
|
2019-10-24 12:05:43 +00:00
|
|
|
{{#if sortedNodes}}
|
2020-06-01 19:03:56 +00:00
|
|
|
<ListPagination
|
|
|
|
@source={{sortedNodes}}
|
|
|
|
@size={{pageSize}}
|
|
|
|
@page={{currentPage}} as |p|>
|
|
|
|
<ListTable
|
|
|
|
@source={{p.list}}
|
|
|
|
@sortProperty={{sortProperty}}
|
|
|
|
@sortDescending={{sortDescending}}
|
|
|
|
@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-06-01 19:03:56 +00:00
|
|
|
<PageSizeSelect @onChange={{action resetPagination}} />
|
2019-10-24 12:05:43 +00:00
|
|
|
<nav class="pagination" data-test-pagination>
|
|
|
|
<div class="pagination-numbers">
|
|
|
|
{{p.startsAt}}–{{p.endsAt}} of {{sortedNodes.length}}
|
|
|
|
</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>
|
|
|
|
{{#if (eq nodes.length 0)}}
|
|
|
|
<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>
|
2019-02-12 19:26:36 +00:00
|
|
|
{{else if (eq filteredNodes.length 0)}}
|
|
|
|
<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>
|
2018-07-25 22:02:49 +00:00
|
|
|
{{else if searchTerm}}
|
|
|
|
<h3 class="empty-message-headline" data-test-empty-clients-list-headline>No Matches</h3>
|
|
|
|
<p class="empty-message-body">No clients match the term <strong>{{searchTerm}}</strong></p>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2019-10-24 12:05:43 +00:00
|
|
|
{{/if}}
|
2018-07-25 22:02:49 +00:00
|
|
|
{{/if}}
|
|
|
|
</section>
|