github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/app/templates/optimize.hbs (about) 1 <Breadcrumb @crumb={{hash label="Recommendations" args=(array "optimize")}} /> 2 <PageLayout> 3 <section class="section"> 4 {{#if this.summaries}} 5 <div class="toolbar collapse"> 6 <div class="toolbar-item"> 7 {{#if this.summaries}} 8 <SearchBox 9 data-test-recommendation-summaries-search 10 @onChange={{this.syncActiveSummary}} 11 @searchTerm={{mut this.searchTerm}} 12 @placeholder="Search 13 {{this.summaries.length}} 14 {{pluralize 'recommendation' this.summaries.length}}..." 15 /> 16 {{/if}} 17 </div> 18 <div class="toolbar-item is-right-aligned is-mobile-full-width"> 19 <div class="button-bar"> 20 {{#if this.system.shouldShowNamespaces}} 21 <SingleSelectDropdown 22 data-test-namespace-facet 23 @label="Namespace" 24 @options={{this.optionsNamespaces}} 25 @selection={{this.qpNamespace}} 26 @onSelect={{action this.setFacetQueryParam "qpNamespace"}} 27 /> 28 {{/if}} 29 <MultiSelectDropdown 30 data-test-type-facet 31 @label="Type" 32 @options={{this.optionsType}} 33 @selection={{this.selectionType}} 34 @onSelect={{action this.setFacetQueryParam "qpType"}} 35 /> 36 <MultiSelectDropdown 37 data-test-status-facet 38 @label="Status" 39 @options={{this.optionsStatus}} 40 @selection={{this.selectionStatus}} 41 @onSelect={{action this.setFacetQueryParam "qpStatus"}} 42 /> 43 <MultiSelectDropdown 44 data-test-datacenter-facet 45 @label="Datacenter" 46 @options={{this.optionsDatacenter}} 47 @selection={{this.selectionDatacenter}} 48 @onSelect={{action this.setFacetQueryParam "qpDatacenter"}} 49 /> 50 <MultiSelectDropdown 51 data-test-prefix-facet 52 @label="Prefix" 53 @options={{this.optionsPrefix}} 54 @selection={{this.selectionPrefix}} 55 @onSelect={{action this.setFacetQueryParam "qpPrefix"}} 56 /> 57 </div> 58 </div> 59 </div> 60 61 {{#if this.filteredSummaries}} 62 {{outlet}} 63 64 <ListTable @source={{this.filteredSummaries}} as |t|> 65 <t.head> 66 <th>Job</th> 67 <th>Recommended At</th> 68 <th># Allocs</th> 69 <th>CPU</th> 70 <th>Mem</th> 71 <th>Agg. CPU</th> 72 <th>Agg. Mem</th> 73 </t.head> 74 <t.body as |row|> 75 {{#if row.model.isProcessed}} 76 <Das::RecommendationRow 77 class="is-disabled" 78 @summary={{row.model}} 79 /> 80 {{else}} 81 <Das::RecommendationRow 82 class="is-interactive 83 {{if 84 (eq row.model this.activeRecommendationSummary) 85 'is-active' 86 }}" 87 @summary={{row.model}} 88 {{on "click" (fn this.transitionToSummary row.model)}} 89 /> 90 {{/if}} 91 </t.body> 92 </ListTable> 93 {{else}} 94 <div class="empty-message" data-test-empty-recommendations> 95 <h3 96 class="empty-message-headline" 97 data-test-empty-recommendations-headline 98 > 99 No Matches 100 </h3> 101 <p class="empty-message-body"> 102 No recommendations match your current filter selection. 103 </p> 104 </div> 105 {{/if}} 106 {{else}} 107 <div class="empty-message" data-test-empty-recommendations> 108 <h3 109 class="empty-message-headline" 110 data-test-empty-recommendations-headline 111 > 112 No Recommendations 113 </h3> 114 <p class="empty-message-body"> 115 All recommendations have been accepted or dismissed. Nomad will 116 continuously monitor applications so expect more recommendations in 117 the future. 118 </p> 119 </div> 120 {{/if}} 121 </section> 122 </PageLayout>