2021-12-17 16:29:36 +00:00
|
|
|
<Breadcrumb @crumb={{hash label="Recommendations" args=(array "optimize")}} />
|
2020-10-29 12:46:42 +00:00
|
|
|
<PageLayout>
|
|
|
|
<section class="section">
|
2021-04-29 20:00:59 +00:00
|
|
|
{{#if this.summaries}}
|
2020-11-30 14:18:44 +00:00
|
|
|
<div class="toolbar collapse">
|
2020-11-06 21:53:58 +00:00
|
|
|
<div class="toolbar-item">
|
2021-04-29 20:00:59 +00:00
|
|
|
{{#if this.summaries}}
|
2020-11-09 15:28:40 +00:00
|
|
|
<SearchBox
|
|
|
|
data-test-recommendation-summaries-search
|
2020-11-30 14:18:44 +00:00
|
|
|
@onChange={{this.syncActiveSummary}}
|
2020-11-06 21:53:58 +00:00
|
|
|
@searchTerm={{mut this.searchTerm}}
|
2022-03-08 17:28:36 +00:00
|
|
|
@placeholder="Search
|
|
|
|
{{this.summaries.length}}
|
|
|
|
{{pluralize 'recommendation' this.summaries.length}}..."
|
|
|
|
/>
|
2020-11-06 21:53:58 +00:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
<div class="toolbar-item is-right-aligned is-mobile-full-width">
|
|
|
|
<div class="button-bar">
|
2021-04-29 20:00:59 +00:00
|
|
|
{{#if this.system.shouldShowNamespaces}}
|
|
|
|
<SingleSelectDropdown
|
|
|
|
data-test-namespace-facet
|
|
|
|
@label="Namespace"
|
|
|
|
@options={{this.optionsNamespaces}}
|
|
|
|
@selection={{this.qpNamespace}}
|
2022-07-11 22:06:18 +00:00
|
|
|
@onSelect={{action this.setFacetQueryParam "qpNamespace"}}
|
2022-03-08 17:28:36 +00:00
|
|
|
/>
|
2021-04-29 20:00:59 +00:00
|
|
|
{{/if}}
|
2020-11-06 21:53:58 +00:00
|
|
|
<MultiSelectDropdown
|
|
|
|
data-test-type-facet
|
|
|
|
@label="Type"
|
|
|
|
@options={{this.optionsType}}
|
|
|
|
@selection={{this.selectionType}}
|
2022-03-08 17:28:36 +00:00
|
|
|
@onSelect={{action this.setFacetQueryParam "qpType"}}
|
|
|
|
/>
|
2020-11-06 21:53:58 +00:00
|
|
|
<MultiSelectDropdown
|
|
|
|
data-test-status-facet
|
|
|
|
@label="Status"
|
|
|
|
@options={{this.optionsStatus}}
|
|
|
|
@selection={{this.selectionStatus}}
|
2022-03-08 17:28:36 +00:00
|
|
|
@onSelect={{action this.setFacetQueryParam "qpStatus"}}
|
|
|
|
/>
|
2020-11-06 21:53:58 +00:00
|
|
|
<MultiSelectDropdown
|
|
|
|
data-test-datacenter-facet
|
|
|
|
@label="Datacenter"
|
|
|
|
@options={{this.optionsDatacenter}}
|
|
|
|
@selection={{this.selectionDatacenter}}
|
2022-03-08 17:28:36 +00:00
|
|
|
@onSelect={{action this.setFacetQueryParam "qpDatacenter"}}
|
|
|
|
/>
|
2020-11-06 21:53:58 +00:00
|
|
|
<MultiSelectDropdown
|
|
|
|
data-test-prefix-facet
|
|
|
|
@label="Prefix"
|
|
|
|
@options={{this.optionsPrefix}}
|
|
|
|
@selection={{this.selectionPrefix}}
|
2022-03-08 17:28:36 +00:00
|
|
|
@onSelect={{action this.setFacetQueryParam "qpPrefix"}}
|
|
|
|
/>
|
2020-11-06 21:53:58 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-01-06 21:01:55 +00:00
|
|
|
|
2020-11-09 15:41:18 +00:00
|
|
|
{{#if this.filteredSummaries}}
|
|
|
|
{{outlet}}
|
2022-01-06 21:01:55 +00:00
|
|
|
|
2022-03-08 17:28:36 +00:00
|
|
|
<ListTable @source={{this.filteredSummaries}} as |t|>
|
2020-11-09 15:41:18 +00:00
|
|
|
<t.head>
|
2022-01-06 21:01:55 +00:00
|
|
|
<th>Job</th>
|
|
|
|
<th>Recommended At</th>
|
|
|
|
<th># Allocs</th>
|
|
|
|
<th>CPU</th>
|
|
|
|
<th>Mem</th>
|
|
|
|
<th>Agg. CPU</th>
|
|
|
|
<th>Agg. Mem</th>
|
2020-11-09 15:41:18 +00:00
|
|
|
</t.head>
|
|
|
|
<t.body as |row|>
|
|
|
|
{{#if row.model.isProcessed}}
|
2022-01-06 21:01:55 +00:00
|
|
|
<Das::RecommendationRow
|
|
|
|
class="is-disabled"
|
|
|
|
@summary={{row.model}}
|
|
|
|
/>
|
2020-11-09 15:41:18 +00:00
|
|
|
{{else}}
|
|
|
|
<Das::RecommendationRow
|
2022-03-08 17:28:36 +00:00
|
|
|
class="is-interactive
|
|
|
|
{{if
|
|
|
|
(eq row.model this.activeRecommendationSummary)
|
|
|
|
'is-active'
|
|
|
|
}}"
|
2020-11-09 15:41:18 +00:00
|
|
|
@summary={{row.model}}
|
|
|
|
{{on "click" (fn this.transitionToSummary row.model)}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|
|
|
|
</t.body>
|
|
|
|
</ListTable>
|
|
|
|
{{else}}
|
|
|
|
<div class="empty-message" data-test-empty-recommendations>
|
2022-03-08 17:28:36 +00:00
|
|
|
<h3
|
|
|
|
class="empty-message-headline"
|
|
|
|
data-test-empty-recommendations-headline
|
|
|
|
>
|
|
|
|
No Matches
|
|
|
|
</h3>
|
2020-11-09 15:41:18 +00:00
|
|
|
<p class="empty-message-body">
|
|
|
|
No recommendations match your current filter selection.
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2020-10-29 12:46:42 +00:00
|
|
|
{{else}}
|
|
|
|
<div class="empty-message" data-test-empty-recommendations>
|
2022-03-08 17:28:36 +00:00
|
|
|
<h3
|
|
|
|
class="empty-message-headline"
|
|
|
|
data-test-empty-recommendations-headline
|
|
|
|
>
|
|
|
|
No Recommendations
|
|
|
|
</h3>
|
2020-10-29 12:46:42 +00:00
|
|
|
<p class="empty-message-body">
|
2022-03-08 17:28:36 +00:00
|
|
|
All recommendations have been accepted or dismissed. Nomad will
|
|
|
|
continuously monitor applications so expect more recommendations in
|
|
|
|
the future.
|
2020-10-29 12:46:42 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</section>
|
2022-01-06 21:01:55 +00:00
|
|
|
</PageLayout>
|